-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01-base-setup.sh
executable file
·50 lines (41 loc) · 1.28 KB
/
01-base-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
set -e
echo "====================================================="
echo "Setting up base development environment..."
echo "====================================================="
# Install Homebrew if not present
if ! command -v brew &> /dev/null; then
echo "Installing Homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add Homebrew to PATH for the current session
eval "$(/opt/homebrew/bin/brew shellenv)"
echo 'export PATH="/opt/homebrew/bin:$PATH"' >> ~/code/scripts/paths.sh
else
echo "Homebrew already installed, updating..."
brew update
fi
# Install CLI utilities
echo "Installing CLI utilities..."
if ! brew list fortune &>/dev/null; then
brew install fortune
else
echo "fortune is already installed."
fi
if ! brew list cowsay &>/dev/null; then
brew install cowsay
else
echo "cowsay is already installed."
fi
if ! brew list lolcat &>/dev/null; then
brew install lolcat
else
echo "lolcat is already installed."
fi
if ! brew list tmux &>/dev/null; then
brew install tmux
else
echo "tmux is already installed."
fi
echo "====================================================="
echo "Base setup complete!"
echo "====================================================="