Skip to content

Commit

Permalink
revise error
Browse files Browse the repository at this point in the history
  • Loading branch information
cmb-sy committed May 25, 2024
1 parent 336e0ca commit 836ef1c
Showing 1 changed file with 25 additions and 21 deletions.
46 changes: 25 additions & 21 deletions brew_install.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,7 @@

export HOMEBREW_NO_AUTO_UPDATE=1

# command isntall
formulas=(
echo "installing homebrew..."
which brew >/dev/null 2>&1 || /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

echo "run brew doctor..."
which brew >/dev/null 2>&1 && brew doctor

echo "run brew update..."
which brew >/dev/null 2>&1 && brew update

echo "run brew upgrade..."
brew upgrade

# command install
formulas=(
fzf
sheldon
Expand All @@ -38,25 +25,42 @@ casks=(
zoom
)

# Install Homebrew if not installed
which brew >/dev/null 2>&1 || /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

# Run brew doctor
which brew >/dev/null 2>&1 && brew doctor

# Run brew update
which brew >/dev/null 2>&1 && brew update

# Run brew upgrade
brew upgrade

brew update
brew tap homebrew/cask-fonts
brew tap ktr0731/evans
brew tap jesseduffield/lazydocker

for formula in ${formulas[@]}; do
brew install ${formula}
# Install formulas
for formula in "${formulas[@]}"; do
brew install "$formula"
done

eval "$(starship init zsh)"
# Initialize starship if installed
if command -v starship >/dev/null 2>&1; then
eval "$(starship init zsh)"
fi

case "${OSTYPE}" in
darwin*)
for cask in ${casks[@]}; do
brew install --cask ${cask}
for cask in "${casks[@]}"; do
brew install --cask "$cask"
done

GCC_VER=$(ls $(brew --prefix)/bin | grep -E "^g\+\+\-(\d+) \->" | awk '{print $1}' | sed -e "s/g++-//g")
sudo ln -snfv $(brew --prefix gcc)/gcc-${GCC_VER} /usr/local/bin/gcc
sudo ln -snfv $(brew --prefix gcc)/g++-${GCC_VER} /usr/local/bin/g++
sudo ln -snfv "$(brew --prefix gcc)/gcc-${GCC_VER}" /usr/local/bin/gcc
sudo ln -snfv "$(brew --prefix gcc)/g++-${GCC_VER}" /usr/local/bin/g++
;;
linux*)
brew install docker
Expand Down

0 comments on commit 836ef1c

Please sign in to comment.