forked from brentyi/dotfilesp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·118 lines (104 loc) · 2.04 KB
/
setup.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/bin/bash
usage() {
echo "Usage: $0 [-c] [-z] [-d] [-r] [-g] [-b] [-m]"
echo -e "\t-c\tcommon utilities: vim, tmux, htop, python"
echo -e "\t-z\tzsh"
echo -e "\t-d\tdotfiles"
echo -e "\t-r\tROS"
echo -e "\t-g\tGoogle Chrome"
echo -e "\t-b\tBeaglebone libraries"
echo -e "\t-m\tMiniconda"
}
valid=0
install_dotfiles=0
install_common=0
install_ros=0
install_chrome=0
install_beaglebone=0
install_zsh=0
install_miniconda=0
while getopts czdrgbm flag; do
case $flag in
c)
valid=1
install_common=1
;;
z)
valid=1
install_zsh=1
;;
d)
valid=1
install_dotfiles=1
;;
r)
valid=1
install_ros=1
;;
g)
valid=1
install_chrome=1
;;
b)
valid=1
install_beaglebone=1
;;
m)
valid=1
install_miniconda=1
;;
?)
valid=0
;;
esac
done
shift $(( OPTIND - 1 ));
if [[ $valid = 0 ]]; then
usage
exit 2
fi
sudo -v
if [[ $install_common = 1 ]]; then
echo -e "\n---------"
echo "Installing common utilities"
echo "---------"
bash scripts/install_common.sh
fi
if [[ $install_zsh = 1 ]]; then
echo -e "\n---------"
echo "Installing ZSH"
echo "---------"
bash scripts/install_zsh.sh
fi
if [[ $install_dotfiles = 1 ]]; then
echo -e "\n---------"
echo "Linking dotfiles"
echo "---------"
bash scripts/linker.sh
fi
if [[ $install_ros = 1 ]]; then
echo -e "\n---------"
echo "Installing ROS"
echo "---------"
bash scripts/install_ros_desktop.sh
fi
if [[ $install_chrome = 1 ]]; then
echo -e "\n---------"
echo "Installing Chrome"
echo "---------"
bash scripts/install_chrome.sh
fi
if [[ $install_beaglebone = 1 ]]; then
echo -e "\n---------"
echo "Beaglebone-specific installations"
echo "---------"
bash scripts/install_beaglebone.sh
fi
if [[ $install_miniconda = 1 ]]; then
echo -e "\n---------"
echo "Miniconda"
echo "---------"
bash scripts/install_miniconda.sh
fi
echo ""
exit 0