summaryrefslogtreecommitdiffstats
path: root/.bash_profile
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2022-03-10 14:31:42 +0100
committerAhmed Abdelhalim <[email protected]>2022-03-10 14:31:42 +0100
commitd7f970a7a52b6e84adf7c11b4bfa57ffff949f96 (patch)
tree1d4477b8327fad768f1532ddb7f03f51059bfe10 /.bash_profile
parent97fe174bd59a150c8cae486f0445ab118a3549ea (diff)
Fix homebrew intel/M1 setup
Homebrew installs in a different path on the new M1 chip macs and that result in incompatibilities between the old and the new setup and making it harder to have a unified generic setup Also the new MacOS Monterey stopped shipping and using bash as the default shell, causing more incompatibilities
Diffstat (limited to '.bash_profile')
-rw-r--r--.bash_profile17
1 files changed, 12 insertions, 5 deletions
diff --git a/.bash_profile b/.bash_profile
index 401e4d5..b24e0f4 100644
--- a/.bash_profile
+++ b/.bash_profile
@@ -1,3 +1,14 @@
+# ==== Homebrew Apple M1/Intel fixing of $PATH
+if [ -d /opt/homebrew ]; then
+ eval "$(/opt/homebrew/bin/brew shellenv)"
+elif [ -d /usr/local/Homebrew ]; then
+ eval "$(/usr/local/Homebrew/bin/brew shellenv)"
+fi
+# ==== $PATH modifications
+# Adding local/bin PATH before /bin PATH
+# export PATH="/usr/local/bin:$PATH"
+# export PATH="/usr/local/sbin:$PATH"
+
# defaultscheme "exfxcxdxbxegedabagacad"
export CLICOLOR=1
export LSCOLORS=gxfxcxdxbxegedabagacad
@@ -15,6 +26,7 @@ export LANG=en_US.UTF-8
export GPG_TTY=$(tty)
unset SSH_AGENT_PID
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
+export BASH_SILENCE_DEPRECATION_WARNING=1 # Silence new macOS warning about bash
# Springer Nature
export VAULT_ADDR=https://vault.halfpipe.io
@@ -43,11 +55,6 @@ alias spr="cd ~/Work/Springer/"
alias htb="cd ~/Work/HTB/"
alias otw="cd ~/Work/OTW/"
-# ==== $PATH modifications
-# Adding local/bin PATH before /bin PATH
-export PATH="/usr/local/bin:$PATH"
-export PATH="/usr/local/sbin:$PATH"
-
# ==== rbenv config.
if command -v rbenv 1>/dev/null 2>&1; then
export PATH="$HOME/.rbenv/bin:$PATH"