From d7f970a7a52b6e84adf7c11b4bfa57ffff949f96 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Thu, 10 Mar 2022 14:31:42 +0100 Subject: 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 --- .bash_profile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to '.bash_profile') 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" -- cgit v1.2.3