-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost_install.sh
executable file
·159 lines (135 loc) · 4.91 KB
/
post_install.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
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
151
152
153
154
155
156
157
158
159
#!/bin/bash
function update {
echo "update"
apt-get update -y
}
function upgrade {
echo "upgrade"
apt-get upgrade -y
}
function autoremove {
echo "autoremove"
sudo apt autoremove -y
}
function dependencies {
sudo apt install curl
sudo apt-get install wget
sudo apt-get install dialog
}
function main {
update
upgrade
dependencies
# https://askubuntu.com/questions/491509/how-to-get-dialog-box-input-directed-to-a-variable
exec 3>&1;
choices=$(dialog --checklist "Which software do you want to install?" 40 40 4 \
1 "Git" on \
2 "Node 18 LTS" on \
3 "JDK 11" on \
4 "Docker & Docker Compose" on \
5 "Chrome" on \
6 "Visual Studio Code" on \
7 "Discord" on \
8 "PGAdmin" on \
9 "Brave" on \
10 "Tailscale" on \
11 "PowerTop" off \
12 "Android Studio" off \
13 "Flutter (without setup)" off \
14 "OBS-Studio" off \
2>&1 1>&3);
clear
for choice in $choices
do
case $choice in
1)
echo "Installing Git"
sudo apt-get install git -y
;;
2)
echo "Installing Node 18"
sudo curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install nodejs -y
;;
3)
echo "Installing JDK 11"
sudo apt-get install openjdk-11-jre -y
sudo apt-get install openjdk-11-jdk openjdk-11-demo openjdk-11-doc openjdk-11-jre-headless openjdk-11-source -y
;;
4)
echo "Installing Docker & Docker Compose"
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
;;
5)
echo "Installing Chrome"
sudo wget -O chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i chrome.deb
sudo apt-get install -f
rm -f chrome.deb
;;
6)
echo "Installing Visual Studio Code"
sudo wget -O vscode.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64'
sudo dpkg -i vscode.deb
sudo apt-get install -f
rm -f vscode.deb
;;
7)
echo "Installing Discord"
sudo wget -O discord.deb 'https://discord.com/api/download?platform=linux&format=deb'
sudo dpkg -i discord.deb
sudo apt-get install -f
rm -f discord.deb
;;
8)
# Installing Postgres & Pgadmin
# https://www.tecmint.com/install-postgresql-and-pgadmin-in-ubuntu/
# https://www.pgadmin.org/download/pgadmin-4-apt/
echo "Installing PGAdmin"
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list'
update
sudo apt install pgadmin4
;;
9)
echo "Installing Brave"
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] https://brave-browser-apt-release.s3.brave.com/ stable main"|sudo tee /etc/apt/sources.list.d/brave-browser-release.list
update
sudo apt install brave-browser -y
;;
10)
echo "Installing Tailscale"
sudo curl -fsSL https://tailscale.com/install.sh | sh
;;
11)
echo "Installing PowerTop"
sudo apt-get install powertop
;;
12)
echo "Installing Android Studio"
sudo apt-get install libcanberra-gtk-module android-sdk
sudo add-apt-repository ppa:maarten-fonville/android-studio -y
update
sudo apt install android-studio -y
;;
13)
# https://docs.flutter.dev/get-started/install/linux
echo "Installing Flutter"
sudo wget -O flutter.tar.xz https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.7.12-stable.tar.xz
sudo tar xf flutter.tar.xz
export PATH="$PATH:flutter/bin"
source $HOME/.bashrc
echo $PATH
which flutter
rm -f flutter.tar.xz
;;
14)
echo "Installing OBS-Studio"
sudo apt-get install obs-studio
;;
esac
done
autoremove
}
main