Skip to content

Commit 54836d1

Browse files
committed
Updates: programs are installed by one command, automation of answers Yes or no, appearance is improved.
1 parent 22ece54 commit 54836d1

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

aut-apps.sh

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
#!/usr/bin/env bash
2-
echo 'Instal Googe Chrome'
3-
sudo bash -c "touch /etc/apt/sources.list.d/google-chrome.list && echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main'>/$
1+
#! /usr/bin/env bash
2+
if [[ $EUID -ne 0 ]]; then
3+
echo "This script must be run as root" 1>&2
4+
exit 1
5+
fi
6+
echo 'Install Google Chrome, Git and Visual Studio Code'
7+
touch /etc/apt/sources.list.d/google-chrome.list
8+
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main'>/etc/apt/sources.list.d/google-chrome.list
49
wget https://dl.google.com/linux/linux_signing_key.pub
5-
sudo bash -c "apt-key add linux_signing_key.pub && apt update && apt install google-chrome-stable"
6-
echo 'Chrome installed, installing git..'
7-
sudo apt-get install git
8-
echo 'Git installed, installing Visual studio code'
10+
apt-key add linux_signing_key.pub
911
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
10-
sudo bash -c "install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/"
11-
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
12-
sudo bash -c "apt-get install apt-transport-https && apt-get update && apt-get install code"
12+
install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
13+
sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
14+
apt update
15+
echo 'Start install'
16+
apt-get -y install google-chrome-stable git apt-transport-https code
17+
apt update
1318
echo 'Complete'

0 commit comments

Comments
 (0)