-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-quickstart.sh
executable file
·59 lines (50 loc) · 2.03 KB
/
install-quickstart.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
#!/bin/bash
# To install Quickstart Development Environment:
#
# 1) Open a terminal window in the virtual machine (Applications->Accessories->Terminal)
#
# 2) bash ~/quickstart/install-quickstart.sh
# ################################################################################ Shorten prompt and set version
echo "qs10" | sudo tee /etc/hostname
# ################################################################################ Reboot functions
function reboot {
echo "gnome-terminal -x bash -c \"~/quickstart/install-quickstart.sh $1\" &" >> ~/.profile
echo "*** REBOOTING ***" | tee -a ~/quickstart/quickstart-install.log
sleep 2
sudo reboot now
exit
}
# Undo any previous reboot script
sed -i 's/gnome-terminal -x bash -c/# deleteme /g' ~/.profile
# ################################################################################ Install it!
# this switch statement handles reboots.
cd ~
case "$1" in
"")
bash -x ~/quickstart/quickstart-1-prep.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
bash -x ~/quickstart/quickstart-1a-guest.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
reboot 2
;;
"2")
bash -x ~/quickstart/quickstart-2-slim.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
bash -x ~/quickstart/quickstart-2a-update.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
reboot 3
;;
"3")
bash -x ~/quickstart/quickstart-3-lamp.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
bash -x ~/quickstart/quickstart-4-ides.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
reboot 5
;;
"5")
bash -x ~/quickstart/quickstart-5-browsers.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
bash -x ~/quickstart/quickstart-6-devenv.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
bash -x ~/quickstart/quickstart-7-config.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
reboot 8
;;
"8")
bash -x ~/quickstart/quickstart-8-manualconfig.sh 2>&1 | tee -a ~/quickstart/quickstart-install.log
;;
*)
echo " *** BAD BAD BAD SOMETHING WENT WRONG! CALL A DOCTOR! *** "
;;
esac