-
Notifications
You must be signed in to change notification settings - Fork 0
/
installapps
executable file
·150 lines (132 loc) · 3.63 KB
/
installapps
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
#!/usr/bin/env bash
# Forked from https://github.com/dasgeekchannel/AutoInstallBashScripts
# Adapted for Drupal Developers on Ubunutu
## Define Temporary Directory Location - "ais" stands for "Auto Install Script"
tmp_dir=/tmp/ais
## Define some variables to make it less typing
install='apt install -y'
update='apt update'
user=$USER
## Check if snapd has been installed just in case
check_snap () {
if ! [ -e /usr/lib/snapd ] ; then
$install snapd -y
fi
}
## Start script
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root type: sudo ./installapps"
exit 1
else
#Update and Upgrade
echo "Updating and Upgrading"
$update
echo "Creating temporary folder"
mkdir $tmp_dir
$install dialog
cmd=(dialog --title "StephenCross Installer" --separate-output --checklist "Please Select Software You Want To Install:" 22 80 16)
options=(
#A "<----Category: Software Repositories---->" on
1 "Repo: Install Flatpak" off
2 "Repo: Install Snaps" off
3 "Comm: Zoom Meeting Client" off
4 "Comm: Telegram (Snap)" off
5 "Browser: Google Chrome" off
6 "Browser: Firefox Browser" off
7 "Drupal: Virtualbox" off
8 "Drupal: Docker(CE)" off
9 "Drupal: Visual Studio Code" off
X "Post Install Auto Clean Up & Update" off)
choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty)
clear
for choice in $choices
do
case $choice in
# Section A ------------repos----------------------
1)
#Install Flatpak Repo (Software Repository)
echo "Installing Flatpak Repository"
$install flatpak -y
sleep 1
;;
2)
#Install Snap Repository (Software Repository)
echo "Installing Snap Repository"
check_snap
sleep 1
;;
3)
#Zoom
echo "Installing Zoom Meeting Client"
echo "Installing dependency first"
$install libxcb-xtest0
wget https://zoom.us/client/latest/zoom_amd64.deb -O $tmp_dir/zoom_install.deb
dpkg -i $tmp_dir/zoom_install.deb
sleep 1
;;
4)
#Telegram
echo "Telegram Snap"
check_snap
snap install telegram-desktop
sleep 1
;;
5)
#Chrome
echo "Installing Google Chrome"
if ! [ -e /etc/apt/sources.list.d/google-chrome.list ]; then
wget -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
fi
apt update
$install google-chrome-stable
;;
6)
#Firefox Browser
echo "Firefox"
$install firefox
;;
7)
#Virtualbox
echo "Installing Virtualbox"
$install virtualbox
sleep 1
;;
8) #Docker
echo "Installing Docker CE"
## Setup apt to use a repository over https
$update
$install apt-transport-https
sleep 2
$install ca-certificates
sleep 2
$install curl
sleep 2
$install gnupg-agent
sleep 2
$install software-properties-common
sleep 2
## Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable" -y
apt-get update -y
apt-get install docker-ce
sleep 1
;;
9)
#Visual Studio Code
echo "Visual Studio Code"
wget -O $tmp_dir/visualstudio.deb https://go.microsoft.com/fwlink/?LinkID=760868
dpkg -i $tmp_dir/visualstudio.deb
sleep 1
;;
X)
#Clean up
echo "Cleaning up"
$update
apt autoremove -y
rm -rf $tmp_dir
;;
esac
done
fi