Skip to content

Commit ef055e8

Browse files
authored
Merge pull request #4 from kpi-web-guild/automating_applications
The script installs Google chrome, Visual Studio code and git.
2 parents 3a58a72 + 9568fb1 commit ef055e8

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

aut-apps.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#! /usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
if [[ $EUID -ne 0 ]]; then
6+
echo "This script must be run as root" 1>&2
7+
exit 1
8+
fi
9+
function t-d-uninstaller {
10+
rm -rf $tmp_dir
11+
echo "Temporary directory uninstalled"
12+
}
13+
trap t-d-uninstaller SIGINT SIGTERM EXIT QUIT
14+
tmp_dir=$(mktemp -d -t pub_key-XXXXXX)
15+
echo $tmp_dir
16+
echo 'deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main'>/etc/apt/sources.list.d/google-chrome.list
17+
echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list
18+
curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add linux_signing_key.pub
19+
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > $tmp_dir/microsoft.gpg
20+
install -o root -g root -m 644 $tmp_dir/microsoft.gpg /etc/apt/trusted.gpg.d/
21+
apt update
22+
echo 'Start install'
23+
apt-get -y install google-chrome-stable git apt-transport-https code

0 commit comments

Comments
 (0)