Fixed folder name

This commit is contained in:
2024-04-04 12:09:20 +02:00
parent 433ec62e0e
commit 32a323c76b
6 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,55 @@
#!/bin/bash
#### Variables
APT_UPDATE="apt -y update"
APT_INST="apt -y install"
APT_PURGE="apt -y purge"
APT_REMOVE="apt -y autoremove"
PKG_NAME="codium"
#### Functions
check_root() {
if [ "$EUID" -ne 0 ]; then
echo "Must be root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true
do
read -rN1 input
case $input in
[yY][eE][sS]|[yY])
return 0
break
;;
[nN][oO]|[nN])
return 1
;;
esac
done
}
#### Main
check_root
echo -e "\nUpdate apt"
echo "$APT_UPDATE"
$APT_UPDATE
echo -ne "\nYou want to install vscodium ($PKG_NAME)? "
if choice 2>/dev/null; then
echo -ne "\nAdd repository for vscodium\n"
$APT_INST apt-transport-https wget
wget -O /etc/apt/keyrings/vscodium-archive-keyring.asc https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg
echo 'deb [ signed-by=/etc/apt/keyrings/vscodium-archive-keyring.asc ] https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' | tee /etc/apt/sources.list.d/vscodium.list
$APT_UPDATE
echo -ne "\n$APT_INST $PKG_NAME\n"
$APT_INST $PKG_NAME
fi