Add a script for installing vscode
This commit is contained in:
parent
f8c4781037
commit
e8023042fb
1 changed files with 19 additions and 0 deletions
19
scripts/PopOS/software/code.sh
Normal file
19
scripts/PopOS/software/code.sh
Normal file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
# Elevate script
|
||||
if [ ! "$UID" -eq 0 ]
|
||||
then
|
||||
exec sudo bash "$0"
|
||||
fi
|
||||
|
||||
apt-get install wget gpg
|
||||
keyFile=$(mktemp)
|
||||
|
||||
wget -qO- https://packages.microsoft.com/keys/microsoft.asc \
|
||||
| gpg --dearmor > $keyFile
|
||||
|
||||
install -D -o root -g root -m 644 $keyFile /etc/apt/keyrings/packages.microsoft.gpg
|
||||
|
||||
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" \
|
||||
| tee /etc/apt/sources.list.d/vscode.list
|
||||
|
||||
rm -f $keyFile
|
Loading…
Reference in a new issue