-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-mac-dep.sh
More file actions
32 lines (26 loc) · 957 Bytes
/
install-mac-dep.sh
File metadata and controls
32 lines (26 loc) · 957 Bytes
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
#!/bin/bash
echo "Installing needed dependencies..."
## 1. Install brew if we don't have
if ! command -v brew &>/dev/null; then
echo "Installing brew..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
## 2. Install Node.js if we don't have
if ! command -v node &>/dev/null; then
echo "Installing Node.js..."
brew install node
fi
## 3. Install Xcode Command Tools if we don't have
if ! command -v xcode-select --print-path &>/dev/null; then
echo "Installing Xcode Command Line Tools..."
xcode-select --install
fi
## 4. install Rust if we don't have and ensure that it added to PATH
if ! command -v rustup &>/dev/null; then
echo "Installing Rust..."
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
export PATH="$HOME/.cargo/bin:$PATH"
else
export PATH="$HOME/.cargo/bin:$PATH"
fi
echo "All dependencies were successfully installed!"