forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
executable file
·48 lines (41 loc) · 882 Bytes
/
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
#!/usr/bin/env bash
cd "$(dirname "${BASH_SOURCE}")"
git pull origin master
function doIt() {
rsync \
--exclude ".git/" \
--exclude ".gitignore" \
--exclude ".DS_Store" \
--exclude "bootstrap.sh" \
--exclude "README.md" \
--exclude "setup" \
--exclude "themes" \
-av --no-perms --dry-run . ~
}
if [ "$1" == "--force" -o "$1" == "-f" ]; then
doIt
else
read -p "This may overwrite existing files. Are you sure? (y/n) " -n 1
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
doIt
fi
fi
read -p "Install packages etc...? (y/n) " -n 1 REPLY
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
setup/brew.sh;
setup/npm.sh;
fi
read -p "Install extras? (y/n) " -n 1 REPLY
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
setup/extra.sh;
fi
read -p "Run Mountain Lion customization? (y/n) " -n 1 REPLY
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
setup/osx-mlion.sh;
fi
unset doIt
source ~/.bash_profile