|
2 | 2 | export DOTFILES_DIR EXTRA_DIR |
3 | 3 | DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && cd .. && pwd)" |
4 | 4 |
|
5 | | -# Install oh-my-zsh |
6 | | -sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
| 5 | +# Install oh-my-zsh if not installed |
| 6 | +if [ ! -d "$HOME/.oh-my-zsh" ]; then |
| 7 | + echo "Installing oh-my-zsh..." |
| 8 | + sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" |
| 9 | + echo "oh-my-zsh installation complete." |
| 10 | +else |
| 11 | + echo "oh-my-zsh already installed, skipping." |
| 12 | +fi |
7 | 13 |
|
8 | | -# Install brew with packages & casks, composer and yarn global packages |
9 | | -. "$DOTFILES_DIR/install/brew.sh" |
| 14 | +# Install Homebrew if not installed |
| 15 | +if ! command -v brew &> /dev/null; then |
| 16 | + echo "Installing Homebrew..." |
| 17 | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
| 18 | + echo "Homebrew installation complete." |
| 19 | +else |
| 20 | + echo "Homebrew already installed, skipping." |
| 21 | +fi |
10 | 22 |
|
11 | | -# Install UV |
12 | | -sh -c "$(curl -fsSL https://astral.sh/uv/install.sh)" |
| 23 | +# Install brew packages & casks from brewfile |
| 24 | +echo "Installing brew packages from Brewfile..." |
| 25 | +brew bundle --file="$DOTFILES_DIR/install/brewfile" |
| 26 | +echo "Brew packages installation complete." |
13 | 27 |
|
14 | | -# Claude CLI |
15 | | -curl -fsSL https://claude.ai/install.sh | sh |
| 28 | +# Install UV if not installed |
| 29 | +if ! command -v uv &> /dev/null; then |
| 30 | + echo "Installing UV..." |
| 31 | + sh -c "$(curl -fsSL https://astral.sh/uv/install.sh)" |
| 32 | + echo "UV installation complete." |
| 33 | +else |
| 34 | + echo "UV already installed, skipping." |
| 35 | +fi |
16 | 36 |
|
17 | | -# OpenCode: https://opencode.ai/docs |
18 | | -curl -fsSL https://opencode.ai/install | sh |
| 37 | +# Install Claude CLI if not installed |
| 38 | +if ! command -v claude &> /dev/null; then |
| 39 | + echo "Installing Claude CLI..." |
| 40 | + curl -fsSL https://claude.ai/install.sh | sh |
| 41 | + echo "Claude CLI installation complete." |
| 42 | +else |
| 43 | + echo "Claude CLI already installed, skipping." |
| 44 | +fi |
| 45 | + |
| 46 | +# Install OpenCode if not installed: https://opencode.ai/docs |
| 47 | +if ! command -v opencode &> /dev/null; then |
| 48 | + echo "Installing OpenCode..." |
| 49 | + curl -fsSL https://opencode.ai/install | sh |
| 50 | + echo "OpenCode installation complete." |
| 51 | +else |
| 52 | + echo "OpenCode already installed, skipping." |
| 53 | +fi |
0 commit comments