Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
xvzc committed Jan 6, 2024
1 parent 7027c27 commit 0115556
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,21 @@ check-or-install-xcode() {
}

check-or-install-brew() {
if type brew >/dev/null 2>&1; then
echo "Found brew at $(whereis brew). Skipping install."
else
echo "homdbrew not found. installing.."
if ! /opt/homebrew/bin/brew shellenv 2>&1; then
echo "homdbrew not found. installing.."
require-sudo

/bin/bash -c \
"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" &&
eval "$(/opt/homebrew/bin/brew shellenv)"
fi

if [ $? -ne 0 ]; then
error "Failed to install brew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
if [ $? -ne 0 ]; then
error "Failed to install brew"
fi
else
echo "Found brew at $(whereis brew). Skipping install."
fi

if ! eval "$(/opt/homebrew/bin/brew shellenv)"; then
error "Failed to run brew shellenv"
fi
}

check-or-install-chezmoi() {
Expand Down

0 comments on commit 0115556

Please sign in to comment.