-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
newUbuntu
executable file
·160 lines (128 loc) · 4.08 KB
/
newUbuntu
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
160
#!/usr/bin/env bash
# Performs common setup steps on a new Installation.
toRemove=''
toInstall=''
gnomeExtensionsInstalled=''
sensorsInstalled=''
echoHugeHeader() {
echo
echo -e "==================== \033[32m\033[1m$1\033[m ==================== "
echo
}
removeTracking() {
toRemove="${toRemove} activity-log-manager apport zeitgeist-datahub"
}
removeApps() {
echoHugeHeader "Removing Apps"
sudo apt purge -y -f ${toRemove} && sudo apt -y -f --purge autoremove
}
installTweaks() {
toInstall="${toInstall} gnome-tweaks"
}
installGnomeExtensions() {
toInstall="${toInstall} chrome-gnome-shell gnome-shell-extensions"
gnomeExtensionsInstalled='1'
}
installSensors() {
toInstall="${toInstall} lm-sensors"
sensorsInstalled='1'
}
installVlc() {
toInstall="${toInstall} vlc"
}
installChromium() {
toInstall="${toInstall} chromium-browser"
}
installBrave() {
echoHugeHeader "Installing Brave"
sudo apt install apt-transport-https curl gnupg
curl -s https://brave-browser-apt-release.s3.brave.com/brave-core.asc | sudo apt-key --keyring /etc/apt/trusted.gpg.d/brave-browser-release.gpg add -
echo "deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" | sudo tee /etc/apt/sources.list.d/brave-browser-release.list
toInstall="${toInstall} brave-browser"
}
installRust() {
rustInstalled='1'
}
installGimp() {
toInstall="${toInstall} gimp gimp-data-extras gimp-plugin-registry"
}
installEnpass() {
echoHugeHeader "Installing Enpass"
echo "deb https://apt.enpass.io/ stable main" | sudo tee /etc/apt/sources.list.d/enpass.list
wget -O - https://apt.enpass.io/keys/enpass-linux.key | sudo apt-key add -
toInstall="${toInstall} enpass"
}
installJre() {
toInstall="${toInstall} openjdk-17-jre"
}
installJdk() {
toInstall="${toInstall} openjdk-17-jdk"
}
installNodejs() {
echoHugeHeader "Installing Node.js"
wget -qO - https://deb.nodesource.com/setup_18.x | sudo -E bash -
toInstall="${toInstall} nodejs"
}
installVscode() {
sudo snap install --classic code
}
installApps() {
echoHugeHeader "Installing Apps"
sudo apt update && sudo apt -y -f install ${toInstall}
}
echoHugeHeader "Checking Prereqs"
sudo apt update && sudo apt -y -f install git
sudo pro config set apt_news=false
echoHugeHeader "Getting Scripts"
wget -qO- https://raw.githubusercontent.com/aensley/UbuntuScripts/master/sbin/updateScripts | bash -
removeChoices=$(
whiptail --title "Select Software to Remove" --checklist "Select Software to Remove" 10 40 5 \
Tracking "Tracking" on \
3>&1 1>&2 2>&3
)
installChoices=$(
whiptail --title "Select Software to Install" --checklist "Select Software to Install" 23 50 17 \
Tweaks "Gnome Tweak Tool" on \
GnomeExtensions "Gnome Extensions" on \
Sensors "Sensors" on \
Vlc "VLC" on \
Chromium "Chromium" off \
Brave "Brave Browser" on \
Gimp "GIMP" on \
Enpass "Enpass" on \
Vscode "VS Code" on \
Jre "JRE 17" off \
Jdk "JDK 17" on \
Nodejs "Node.js 18" on \
Rust "Rust" on \
3>&1 1>&2 2>&3
)
for removeJob in ${removeChoices}; do
eval "remove${removeJob}"
done
removeApps
echoHugeHeader "Upgrading System"
sudo apt update && sudo apt -y -f -u full-upgrade && sudo apt autoremove --purge && sudo apt clean
for installJob in ${installChoices}; do
eval "install${installJob}"
done
installApps
if [ -n "${rustInstalled}" ]; then
echoHugeHeader "Installing Rust"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
fi
if [ -n "${sensorsInstalled}" ]; then
echoHugeHeader "Setting up Sensors"
sudo sensors-detect
sudo /etc/init.d/kmod start
fi
echoHugeHeader "Upgrading System"
/usr/local/sbin/upgrade
if [ -n "${gnomeExtensionsInstalled}" ]; then
echoHugeHeader "Opening favorite Gnome extensions"
read -p "Please enter your email address for profile Gravatar: " gravatarEmail
dconf write /org/gnome/shell/extensions/gravatar/email "'${gravatarEmail}'"
xdg-open "https://extensions.gnome.org/extension/1262/bing-wallpaper-changer/"
xdg-open "https://extensions.gnome.org/extension/1015/gravatar/"
xdg-open "https://extensions.gnome.org/extension/1460/vitals/"
fi