mirror of
https://github.com/kremalicious/dotfiles.git
synced 2024-11-22 01:37:14 +01:00
homebrew install tweaks
This commit is contained in:
parent
9b24b09040
commit
69633a35ae
@ -1,19 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# give me /usr/local first
|
|
||||||
#sudo chown -R "$USER" /usr/local
|
|
||||||
|
|
||||||
# Install Homebrew
|
# Install Homebrew
|
||||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
|
||||||
# Make sure we’re using the latest Homebrew
|
if [[ $(uname -m) == 'arm64' ]]; then
|
||||||
brew update
|
PATH_HOMEBREW=/opt/homebrew
|
||||||
|
else
|
||||||
# Upgrade any already-installed formulae
|
PATH_HOMEBREW=/usr/local
|
||||||
brew upgrade --all
|
fi
|
||||||
|
|
||||||
# Install what we need
|
# Install what we need
|
||||||
brew install \
|
$PATH_HOMEBREW/bin/brew install \
|
||||||
coreutils \
|
coreutils \
|
||||||
zsh \
|
zsh \
|
||||||
zsh-syntax-highlighting \
|
zsh-syntax-highlighting \
|
||||||
@ -34,4 +31,4 @@ brew install \
|
|||||||
clamav
|
clamav
|
||||||
|
|
||||||
# Remove outdated versions from the cellar.
|
# Remove outdated versions from the cellar.
|
||||||
brew cleanup
|
$PATH_HOMEBREW/bin/brew cleanup
|
||||||
|
@ -54,9 +54,15 @@ echo " ✓ done$(tput sgr0)"
|
|||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
# Switch to using brew-installed zsh as default shell
|
# Switch to using brew-installed zsh as default shell
|
||||||
if ! grep -F -q '/opt/homebrew/bin/zsh' /etc/shells; then
|
if [[ $(uname -m) == 'arm64' ]]; then
|
||||||
echo '/opt/homebrew/bin/zsh' | sudo tee -a /etc/shells;
|
PATH_HOMEBREW=/opt/homebrew
|
||||||
chsh -s /opt/homebrew/bin/zsh;
|
else
|
||||||
|
PATH_HOMEBREW=/usr/local
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep -F -q "$PATH_HOMEBREW/bin/zsh" /etc/shells; then
|
||||||
|
echo "$PATH_HOMEBREW/bin/zsh" | sudo tee -a /etc/shells;
|
||||||
|
chsh -s $PATH_HOMEBREW/bin/zsh;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
echo "$(tput setaf 64)============================================="
|
echo "$(tput setaf 64)============================================="
|
||||||
|
2
exports
2
exports
@ -17,6 +17,8 @@ else
|
|||||||
PATH_HOMEBREW=/usr/local
|
PATH_HOMEBREW=/usr/local
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
export PATH_HOMEBREW
|
||||||
|
|
||||||
PATH_OPENSSL=$PATH_HOMEBREW/opt/openssl/bin
|
PATH_OPENSSL=$PATH_HOMEBREW/opt/openssl/bin
|
||||||
# PATH_RUBY=$(brew --prefix ruby)/bin
|
# PATH_RUBY=$(brew --prefix ruby)/bin
|
||||||
# PATH_GEMS=$PATH_HOMEBREW/lib/ruby/gems/2.6.0/bin
|
# PATH_GEMS=$PATH_HOMEBREW/lib/ruby/gems/2.6.0/bin
|
||||||
|
Loading…
Reference in New Issue
Block a user