Add failing script to install firefox

This commit is contained in:
rockstable 2022-12-10 21:18:37 +01:00
parent 14662149fe
commit 9f6d352899
1 changed files with 7 additions and 4 deletions

View File

@ -1,15 +1,18 @@
#!/bin/bash #!/bin/bash
### FAILS: snapd is not running during FAI
if [ "${#SNAPS[*]}" -eq 0 ]; then if [ "${#SNAPS[*]}" -eq 0 ]; then
SNAPS=( firefox ) SNAPS=( firefox )
fi fi
function package_exists() { function package_exists() {
return dpkg -l "$1" &> /dev/null $ROOTCMD dpkg -l "$1" &> /dev/null
return $?
} }
for SNAP in $SNAPS; do for SNAP in "${SNAPS[@]}"; do
if ! package_exists "snapd"; then if package_exists "snapd"; then
snap install "$SNAP" $ROOTCMD snap install "$SNAP"
fi fi
done done