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