aboutsummaryrefslogtreecommitdiff
path: root/.macos
diff options
context:
space:
mode:
Diffstat (limited to '.macos')
-rw-r--r--.macos19
1 files changed, 7 insertions, 12 deletions
diff --git a/.macos b/.macos
index f154236..f28342f 100644
--- a/.macos
+++ b/.macos
@@ -1,23 +1,18 @@
#!/usr/bin/env bash
-macos_update_path () {
- new_path=$1
- [ -d $new_path ] && export PATH=$new_path:$PATH
-}
+[ $(uname) = Darwin ] || return
-macos_update_path /usr/local/opt/openjdk/bin
-macos_update_path /usr/local/opt/ruby/bin
-macos_update_path /usr/local/opt/llvm/bin
+export IS_MACOS=1
export BROWSER='open'
-
alias bug='brew upgrade --greedy'
-if [[ $(spctl --status) == 'assessments enabled' ]]; then
- echo 'Software installment is limited again. Password is required to remove the limit.'
+[ "$(spctl --status)" = 'assessments enabled' ] &&
+ echo 'Software installment is limited again. Password is required to remove the limit.' &&
sudo spctl --master-disable
-fi
-[[ $(arch) = "arm64" ]] &&
+[ $(arch) = 'arm64' ] &&
+ [ -x /opt/homebrew/bin/brew ] &&
eval "$(/opt/homebrew/bin/brew shellenv)" ||
+ [ -x /usr/local/Homebrew/bin/brew ] &&
eval "$(/usr/local/Homebrew/bin/brew shellenv)"