diff options
| author | Ahmed Abdelhalim <[email protected]> | 2022-03-10 14:31:42 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2022-03-10 14:31:42 +0100 |
| commit | d7f970a7a52b6e84adf7c11b4bfa57ffff949f96 (patch) | |
| tree | 1d4477b8327fad768f1532ddb7f03f51059bfe10 | |
| parent | 97fe174bd59a150c8cae486f0445ab118a3549ea (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
| -rw-r--r-- | .bash_profile | 17 | ||||
| -rw-r--r-- | README.md | 4 |
2 files changed, 14 insertions, 7 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" @@ -85,8 +85,8 @@ gpg --edit-key [email protected] ## MacOS (extras) - Bash shell default ```bash -sudo bash -c 'echo /usr/local/bin/bash >> /etc/shells' -chsh -s /usr/local/bin/bash +sudo bash -c 'echo $(brew --prefix)/bin/bash >> /etc/shells' +chsh -s $(brew --prefix)/bin/bash ``` ## ParrotOS (extras) |
