-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
53 lines (39 loc) · 1.4 KB
/
setup.sh
File metadata and controls
53 lines (39 loc) · 1.4 KB
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
51
52
53
#!/bin/bash
# macOS development environment setup
echo "Starting setup..."
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
# Update Homebrew recipes
echo "Updating homebrew..."
brew update
# Upgrade any already-installed formulae
echo "Upgrading existing brews..."
brew upgrade
# Install Oh My Zsh
echo "Installing Oh My Zsh..."
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Install applications from apps.txt
echo "Installing applications from apps.txt..."
while IFS= read -r app; do
brew install --cask "$app"
done < apps.txt
# Install nvm and Node.js
echo "Installing nvm (Node Version Manager)..."
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
# Source nvm script directly to use it in the same shell session
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# Install the latest version of Node.js
echo "Installing the latest version of Node.js..."
nvm install node
# Set the default version of Node.js
nvm alias default node
# Cleaning up Homebrew's cache
echo "Cleaning up..."
brew cleanup
echo "Setup complete! Your Mac is now ready for development."
# End of the script