This commit is contained in:
2026-06-09 14:12:36 +02:00
parent de047a424d
commit 82f7eb0d4a
34 changed files with 0 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
#!/bin/bash
#### Variables
EXTENSIONS_PHP=(xdebug.php-debug zobo.php-intellisense lkrms.pretty-php)
EXTENSIONS_MISC=(foxundermoon.shell-format)
#### Functions
check_notroot() {
if ! [ "$EUID" -ne 0 ]; then
echo "Must be non-root to run $0"
exit
fi
}
choice() {
echo -ne "[y/n]"
while true; do
read -rN1 input
echo " "
case $input in
[yY][eE][sS] | [yY])
return 0
break
;;
[nN][oO] | [nN])
return 1
;;
esac
done
}
#### Main
check_notroot
echo -ne "\nYou want to install vscodium extensions for php (${EXTENSIONS_PHP[@]})? "
if choice 2>/dev/null; then
for EXT_NAME in "${EXTENSIONS_PHP[@]}"; do
codium --force --install-extension $EXT_NAME
done
fi
echo -ne "\nYou want to install vscodium misc extensions (${EXTENSIONS_MISC[@]})? "
if choice 2>/dev/null; then
for EXT_NAME in "${EXTENSIONS_MISC[@]}"; do
codium --force --install-extension $EXT_NAME
done
fi