File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments