Added pre-setup to flatpak if its installed

This commit is contained in:
Eric Renfro 2023-09-22 10:45:41 -04:00
parent 944129b407
commit feab5a82fa
Signed by: psi-jack
GPG key ID: 14977F3A50D9A5BF

View file

@ -66,10 +66,15 @@ rsync --ignore-existing -raz trusted.gpg.d/ /etc/apt/trusted.gpg.d/
apt update
failinstall=""
flatpak=0
echo " * Gathering installed packages"
#xargs aptitude --schedule-only install < InstallOnly.list
while read p; do
if [[ "$p" = "flatpak" ]]; then
flatpak=1
fi
dpkg-query -s "$p" &>/dev/null
if [[ "$?" -eq 1 ]]; then
aptitude --schedule-only install "$p"
@ -89,6 +94,11 @@ echo "$failinstall"
echo " * Restoring installed packages (please confirm)"
aptitude install
if [[ "$flatpak" -eq 1 ]]; then
echo " * Adding flatpak repo: Flathub"
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
fi
echo "Packages that failed to schedule for install:"
echo "$failinstall"
EOF