feat(install): add brew installation and Brewfile install
This commit is contained in:
parent
f2a3df682e
commit
df7bec8f90
1 changed files with 20 additions and 1 deletions
|
@ -21,10 +21,29 @@ install_dotfiles () {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -d ~/.oh-my-zsh ]]; then
|
if [[ ! -d ~/.oh-my-zsh ]]; then
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc
|
||||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/themes/powerlevel10k
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $HOME/.oh-my-zsh/themes/powerlevel10k
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Path to Brewfile
|
||||||
|
BREWFILE="$HOME/.Brewfile"
|
||||||
|
|
||||||
|
if ! command -v brew &>/dev/null; then
|
||||||
|
echo "Homebrew not found. Installing..."
|
||||||
|
|
||||||
|
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||||
|
|
||||||
|
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -f "$BREWFILE" ]]; then
|
||||||
|
echo "Installing from Brewfile: $BREWFILE"
|
||||||
|
brew bundle --file="$BREWFILE"
|
||||||
|
else
|
||||||
|
echo "No Brewfile found at $BREWFILE"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue