File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,15 @@ if [[ $EUID -ne 0 ]]; then
3
3
echo " This script must be run as root" 1>&2
4
4
exit 1
5
5
fi
6
- touch /etc/apt/sources.list.d/google-chrome.list
6
+ tmp_dir=$( mktemp -d -t pub_key-XXXXXX)
7
+ echo $tmp_dir
7
8
echo ' deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main' > /etc/apt/sources.list.d/google-chrome.list
8
9
echo " deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list
9
10
curl -fsSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add linux_signing_key.pub
10
- curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
11
+ curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > $tmp_dir / microsoft.gpg
11
12
install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
12
13
apt update
13
14
echo ' Start install'
14
15
apt-get -y install google-chrome-stable git apt-transport-https code
15
- echo ' Complete'
16
+ rm -rf $tmp_dir
17
+ echo ' Complete'
You can’t perform that action at this time.
0 commit comments