-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvs-setup.bash
More file actions
executable file
·62 lines (54 loc) · 1.96 KB
/
vs-setup.bash
File metadata and controls
executable file
·62 lines (54 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
read -p 'Möchtest du Visual Studio Code (VSCode) oder VSCodium (VSCodium) installieren? Bitte gebe VSCode oder VSCodium ein: ' codevar
test -d ../Mathe-Abitur
dirvar=$(echo $?)
if [ $codevar == 'VSCode' ]
then
if [ $dirvar == 0 ]
then
echo VSCode
echo
wget -O vscode.deb "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64"
sudo dpkg -i vscode.deb
code --install-extension James-Yu.latex-workshop
touch ~/.config/Code/User/settings.json
echo "{
}" >> ~/.config/Code/User/settings.json
sed -i '2i \ \ \ \ "latex-workshop.latex.outDir": "build"' ~/.config/Code/User/settings.json
rm vscode.deb
echo
echo Done
exit
fi
elif [ $codevar == 'VSCodium' ]
then
echo Codium
if [ $dirvar == 0 ]
then
dpkg -s snap &> /dev/null
if [ $? -ne 0 ]
then
snap install codium --classic
else
# Installation based on the VSCodium installation guide: https://vscodium.com/#install
wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
| gpg --dearmor \
| sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' \
| sudo tee /etc/apt/sources.list.d/vscodium.list
sudo apt update && sudo apt install codium
fi
codium --install-extension James-Yu.latex-workshop
touch ~/.config/VSCodium/User/settings.json
echo "{
}" >> ~/.config/VSCodium/User/settings.json
sed -i '2i \ \ \ \ "latex-workshop.latex.outDir": "build"' ~/.config/VSCodium/User/settings.json
echo
echo Done
exit
fi
exit
else
echo
echo Die Eingabe wurde nicht erkannt. Bitte führe das Script nochmal aus.
fi