-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·55 lines (46 loc) · 1.15 KB
/
setup.sh
File metadata and controls
executable file
·55 lines (46 loc) · 1.15 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
#!/usr/bin/env bash
brewfiles=(*.Brewfile)
# Install command line tools
xcode-select --install
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "===== Installing Homebrew ====="
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
echo ""
echo "===== Updating Homebrew ====="
brew update
echo ""
echo "===== Tapping homebrew/bundle ====="
brew tap homebrew/bundle
echo ""
echo "===== Installing base packages ====="
brew bundle install
for b in ${brewfiles[@]}; do
echo ""
read -r -p "Do you want to install $b packages? [y/N] " response
case "$response" in
[yY][eE][sS]|[yY])
echo "===== Installing $b packages =====";
brew bundle install --file=$b;
;;
*)
echo "===== Skipping $b packages =====";
;;
esac
done
echo ""
echo "===== Cleanup Homebrew ====="
brew cleanup
echo ""
read -r -p "Do you want to apply the settings in defaults.sh [y/N] " response
case "$response" in
[yY][eE][sS]|[yY])
echo "===== Applying defaults.sh =====";
source ./defaults.sh;
;;
*)
echo "===== Skipping defaults.sh =====";
;;
esac