-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_etc.sh
executable file
·38 lines (31 loc) · 1.51 KB
/
install_etc.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
# install terminator
echo "install chrome start"
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.list'
sudo apt update
sudo apt install -y google-chrome-stable
sudo rm -rf /etc/apt/sources.list.d/google.list
# install terminator
echo "install terminator start"
sudo apt install -y terminator
# install visual studio code
echo "install vscode start"
sudo apt install -y curl software-properties-common apt-transport-https wget
# current ubuntu version
UbuntuVersion=$(lsb_release -rs)
if [[ "$UbuntuVersion" == "18.04" ]]; then
echo "Detected Ubuntu 18.04. Installing VSCode for 18.04..."
sudo sh -c 'curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg'
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt update
sudo apt install -y code
elif [[ "$UbuntuVersion" == "20.04" || "$UbuntuVersion" == "22.04" ]]; then
echo "Detected Ubuntu $UbuntuVersion. Installing VSCode for 20.04 and later..."
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
sudo apt update
sudo apt install -y code
else
echo "Unsupported Ubuntu version: $UbuntuVersion"
exit 1
fi