forked from rsnk96/Ubuntu-Setup-Scripts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
2-GenSoftware.sh
executable file
·186 lines (153 loc) · 6.74 KB
/
2-GenSoftware.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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#!/bin/bash
execute () {
echo "$ $*"
OUTPUT=$($@ 2>&1)
if [ $? -ne 0 ]; then
echo "$OUTPUT"
echo ""
echo "Failed to Execute $*" >&2
exit 1
fi
}
execute sudo apt-get install libboost-all-dev curl -y
if [[ $(cat /etc/os-release | grep "VERSION_ID" | grep -o -E '[1-9][1-9]') -le 17 ]]; then
execute sudo add-apt-repository ppa:noobslab/themes -y
execute sudo apt-get update
fi
if [[ $XDG_CURRENT_DESKTOP = *"Unity"* ]]; then # To be removed once Unity is phased out
execute sudo apt-get install unity-tweak-tool -y
elif [[ $XDG_CURRENT_DESKTOP = *"GNOME"* ]]; then
execute sudo apt-get install gnome-tweak-tool -y
execute sudo apt-get install gnome-shell-extensions -y
elif [[ $XDG_CURRENT_DESKTOP = *"MATE"* ]]; then
execute sudo apt-get install mate-tweak -y
fi
execute sudo apt-get install arc-theme -y
# Install code editor of your choice
if [[ ! -n $CIINSTALL ]]; then
read -p "Download and Install VS Code / Atom / Sublime. Press q to skip this. Default: Skip Editor installation [v/a/s/q]: " tempvar
fi
tempvar=${tempvar:-q}
if [ "$tempvar" = "v" ]; then
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
execute sudo apt-get install apt-transport-https -y
execute sudo apt-get update
execute sudo apt-get install code -y # or code-insiders
execute rm microsoft.gpg
elif [ "$tempvar" = "a" ]; then
execute sudo add-apt-repository ppa:webupd8team/atom
execute sudo apt-get update; execute sudo apt-get install atom -y
elif [ "$tempvar" = "s" ]; then
wget -q -O - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
execute sudo apt-get install apt-transport-https -y
execute sudo apt-get update
execute sudo apt-get install sublime-text -y
elif [ "$tempvar" = "q" ];then
echo "Skipping this step"
fi
# Recommended libraries for Nvidia CUDA
execute sudo apt-get install freeglut3 freeglut3-dev libxi-dev libxmu-dev -y
# General Software from now on
# Enable partner repositories if disabled
sudo sed -i.bak "/^# deb .*partner/ s/^# //" /etc/apt/sources.list
execute sudo apt-get update
if which nautilus > /dev/null; then
execute sudo apt-get install nautilus-dropbox -y
elif which caja > /dev/null; then
execute sudo apt-get install caja-dropbox -y
fi
# TLP manager
execute sudo add-apt-repository ppa:linrunner/tlp -y
execute sudo apt-get update
execute sudo apt-get install tlp tlp-rdw -y
sudo tlp start
# Multiload and other sensor applets
execute sudo apt-get install lm-sensors hddtemp -y
execute sudo apt-get install psensor xsensors -y
execute sudo apt-get update
execute sudo apt-get install redshift redshift-gtk shutter -y
mkdir -p ~/.config/autostart
cp ./config_files/tilda.desktop ~/.config/autostart
cp ./config_files/redshift-gtk.desktop ~/.config/autostart
execute sudo apt-get install htop gparted expect -y
# Boot repair
execute sudo add-apt-repository ppa:yannubuntu/boot-repair -y
execute sudo apt-get update
execute sudo apt-get install -y boot-repair
# Installation of Docker Community Edition
if ! which docker > /dev/null; then
echo "Installing docker"
execute wget get.docker.com -O dockerInstall.sh
execute chmod +x dockerInstall.sh
execute ./dockerInstall.sh
execute rm dockerInstall.sh
# Adds user to the `docker` group so that docker commands can be run without sudo
execute sudo usermod -aG docker ${USER}
fi
# nvidia-docker installation
# Only install if Nvidia GPU is present with drivers installed
if which nvidia-smi > /dev/null; then
echo "Installing nvidia-docker"
# If you have nvidia-docker 1.0 installed: we need to remove it and all existing GPU containers
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
execute sudo apt-get update
execute sudo apt-get install -y nvidia-container-toolkit
execute sudo systemctl restart docker
else
echo "Skipping nvidia-docker2 installation. Requires Nvidia GPU with drivers installed"
fi
# Grub customization
execute sudo add-apt-repository ppa:danielrichter2007/grub-customizer -y
execute sudo apt-get update
execute sudo apt-get install grub-customizer -y
# Screen Recorder
execute sudo add-apt-repository ppa:sylvain-pineau/kazam -y
execute sudo apt-get update
execute sudo apt-get install kazam -y
# Keepass 2
execute sudo apt-add-repository ppa:jtaylor/keepass -y
execute sudo apt-get update -y
execute sudo apt-get install xdotool keepass2 -y
execute sudo apt-get install vlc -y
execute mkdir -p ~/.cache/vlc # For VLSub to work flawlessly
if [[ $(cat /etc/os-release | grep "VERSION_ID" | grep -o -E '[1-9][1-9]') -ge 18 ]]; then
execute sudo apt-get install vmg -y # Virtual magnifying glass, enabled by shortcut Super+<NumPadPlus>
fi
# Browsers
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
execute sudo apt-get update -y
execute sudo apt-get install google-chrome-stable -y
#execute sudo apt-get install chromium-browser -y
execute sudo apt-get install firefox -y
# Install tor
#if [[ ! -n $(lsb_release -d | grep 18) ]]; then
# execute sudo add-apt-repository ppa:webupd8team/tor-browser -y
# execute sudo apt-get update -y
# execute sudo apt-get install tor-browser -y
#else
# execute sudo apt-get install tor torbrowser-launcher -y
#fi
# # # Install I2P
# # execute sudo apt-add-repository ppa:i2p-maintainers/i2p -y
# # execute sudo apt-get update -y
# # execute sudo apt-get install i2p -y
if [[ ! -n $CIINSTALL ]]; then
# Adobe flashplugin doesn't install on travis for some reason
execute sudo apt-get install adobe-flashplugin -y
# Skype - travis doesn't allow dpkg -i for some reason
# echo "deb [arch=amd64] https://repo.skype.com/deb stable main" | sudo tee /etc/apt/sources.list.d/skype-stable.list
# execute wget https://repo.skype.com/data/SKYPE-GPG-KEY
# execute sudo apt-key add SKYPE-GPG-KEY
# execute sudo apt install apt-transport-https
# execute sudo apt update
# execute sudo apt install skypeforlinux
# execute rm SKYPE-GPG-KEY
su - ${USER} # For user being added to docker group to take effect
fi
echo "Script finished"