-
Notifications
You must be signed in to change notification settings - Fork 2
/
bootstrap-mac.sh
executable file
·62 lines (49 loc) · 1.41 KB
/
bootstrap-mac.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
51
52
53
54
55
56
57
58
59
60
61
62
set -e
. lib-ui.sh
. lib-misc.sh
info "Beginning bootstrapping for OS X...\n"
# Download and install Command Line Tools
if [[ ! -x /usr/bin/gcc ]]; then
info "Installing XCode Command Line Tools\n"
xcode-select --install
fi
# Download and install Homebrew
if [[ ! -x /usr/local/bin/brew ]]; then
info "Installing Homebrew\n"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Download and install zsh
if [[ ! -x /usr/local/bin/zsh ]]; then
info "Installing zsh\n"
brew install zsh
fi
# Modify the path
export PATH=/usr/local/bin:$PATH
# Download and install git
if [[ ! -x /usr/local/bin/git ]]; then
info "Installing git\n"
brew install git
fi
# Download and install python
if [[ ! -x /usr/local/bin/python ]]; then
info "Installing Python\n"
brew install python
fi
# Download and install Ansible
if [[ ! -x /usr/local/bin/ansible ]]; then
info "Installing Ansible"
brew install ansible
fi
# if ! (brew list -1 | grep -q "^brew-cask$"); then
# info "Installing brew cask...\n"
# brew tap homebrew/cask-cask
# fi
# if ! (brew tap | grep -q "^homebrew/versions"); then
# info "Tapping brew cask versions...\n"
# brew tap caskroom/versions
# fi
success "Bootstrapping is complete\n"
if [ ! "$SHELL" == "/usr/local/bin/zsh" ]; then
info "Switching to Oh-My-Zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
fi