-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·52 lines (42 loc) · 1.38 KB
/
bootstrap.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
#!/usr/bin/env bash
###################################
# Bootstrap script for macOS Sierra
###################################
# Ask for the sudo password
sudo -v
# update existing `sudo` time stamp until the script has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
####################
# 1. XCode CLI Tools
####################
# xcode-cli: check installation
if [ ! -d "/Library/Developer/CommandLineTools" ]; then
xcode-select --install
read -p "xcode-cli: press [ENTER] after finishing the installation..."
fi
#############
# 2. Homebrew
#############
# homebrew: check installation
/usr/bin/which brew 2>&1 >/dev/null
if [[ $? != 0 ]]; then
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
if [[ $? != 0 ]]; then
echo "homebrew: unexpected problem, aborting"
exit 1
fi
fi
######################################
## 3. Miscellaneous downloads #
######################################
# iTerm2 colorschemes
if [ ! -f ~/Downloads/iTerm2-colorschemes.tar.gz ]
then
$(which wget) "https://github.com/mbadolato/iTerm2-Color-Schemes/tarball/master" -O ~/Downloads/iTerm2-colorschemes.tar.gz
fi
# Google Noto font
if [ ! -f ~/Downloads/NotoMono-hinted.zip ]
then
$(which wget) "https://noto-website.storage.googleapis.com/pkgs/NotoMono-hinted.zip" -O ~/Downloads/NotoMono-hinted.zip
fi
exit 0