-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
56 lines (43 loc) · 1.14 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
53
54
55
56
#!/bin/bash
function runDotFiles() {
echo "Copying dotfiles…"
chmod 644 $(find ${PWD}/bin -type f);
rsync -avzh ${PWD}/bin/ ~/;
source ~/.bash_profile;
}
function runHomebrew() {
source ${PWD}/lib/brew.sh;
}
function runMacOS() {
source ${PWD}/lib/macOS.sh;
}
function runBash() {
source ${PWD}/lib/bash.sh;
}
function runNodeJS() {
source ${PWD}/lib/nodejs.sh;
}
function runOhMyZSH() {
source ${PWD}/lib/oh-my-zsh.sh;
}
function killAll() {
source ${PWD}/lib/killall.sh;
}
function runAll() {
runHomebrew && runMacOS && runBash && runNodeJS && runOhMyZSH && runDotFiles && killAll;
}
if [ "$1" == "--force" -o "$1" == "-f" ]; then
runDotFiles;
else
read -p "What would you like to bootstrap? (all, dotfiles, homebrew, macOS, bash, nodeJS, ohmyzsh) " TYPE;
echo "";
[[ "$TYPE" == "dotfiles" ]] && runDotFiles;
[[ "$TYPE" == "homebrew" ]] && runHomebrew;
[[ "$TYPE" == "macOS" ]] && runMacOS;
[[ "$TYPE" == "bash" ]] && runBash;
[[ "$TYPE" == "nodeJS" ]] && runNodeJS;
[[ "$TYPE" == "ohmyzsh" ]] && runOhMyZSH;
[[ "$TYPE" == "all" ]] && runAll;
[[ "$TYPE" == "kill" ]] && killAll;
fi;
unset runDotFiles;