Skip to content

Commit 13f8608

Browse files
authored
Create install_vs_code.sh
1 parent 17cf103 commit 13f8608

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

install_vs_code.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
3+
# check if root user | re-run if not
4+
if [ "$(id -u)" != "0" ]; then
5+
sudo `dirname $0`/`basename $0`
6+
exit
7+
fi
8+
9+
# add key and sources
10+
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
11+
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
12+
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
13+
rm -f packages.microsoft.gpg
14+
15+
# update
16+
sudo apt install apt-transport-https
17+
sudo apt update
18+
19+
# install packages
20+
sudo apt install -y \
21+
code

0 commit comments

Comments
 (0)