-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdependencies.sh
More file actions
58 lines (48 loc) · 1.37 KB
/
dependencies.sh
File metadata and controls
58 lines (48 loc) · 1.37 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
54
55
56
57
58
#!/bin/sh
SCRIPT_PATH=$( realpath "$0" )
SCRIPT_DIR=$( dirname "$SCRIPT_PATH" )
# Install Homebrew:
if ! command -v brew; then
echo "Installing Homebrew\n"
curl -fsSLo /tmp/hombrew-install.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
chmod +x /tmp/hombrew-install.sh
/tmp/hombrew-install.sh
# Initialize brew for current shell (handles both Apple Silicon and Intel Macs)
if [ -x "/opt/homebrew/bin/brew" ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -x "/usr/local/bin/brew" ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
fi
if ! command -v git; then
echo "Installing Git\n"
brew install git
fi
if ! command -v npm; then
echo "Installing Node\n"
brew install nodejs
fi
if ! command -v pip3; then
echo "Installing Python3\n"
brew install python3
fi
if ! command -v bun; then
echo "installing bun"
curl -fsSLo /tmp/bun-install.sh https://bun.sh/install
chmod +x /tmp/bun-install.sh
/tmp/bun-install.sh
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
fi
if ! command -v pyenv; then
echo "Installing PyEnv\n"
brew install pyenv
fi
# This is covered in the setup.sh script
# echo "Installing Homebrew packages\n"
# xargs brew install < "$SCRIPT_DIR"/brew-packages
if ! command -v xcodebuild; then
echo "Installing XCode CLI"
xcode-select --install
fi
# TODO:
# echo "Installing Node packages\n"