Fixed bug on output restore.sh

This commit is contained in:
Eric Renfro 2023-09-23 16:13:00 -04:00
parent 74a0096bbc
commit eef46c38ca
Signed by: psi-jack
GPG Key ID: 14977F3A50D9A5BF
1 changed files with 10 additions and 10 deletions

View File

@ -76,25 +76,25 @@ flatpak=0
echo " * Gathering installed packages"
#xargs aptitude --schedule-only install < InstallOnly.list
while read p; do
if [[ "$p" = "flatpak" ]]; then
if [[ "\$p" = "flatpak" ]]; then
flatpak=1
fi
dpkg-query -s "$p" &>/dev/null
if [[ "$?" -eq 1 ]]; then
aptitude --schedule-only install "$p"
if [[ "$?" -ne 0 ]]; then
if [[ -z "$failinstall" ]]; then
failinstall+="$p"
dpkg-query -s "\$p" &>/dev/null
if [[ "\$?" -eq 1 ]]; then
aptitude --schedule-only install "\$p"
if [[ "\$?" -ne 0 ]]; then
if [[ -z "\$failinstall" ]]; then
failinstall+="\$p"
else
failinstall+=", $p"
failinstall+=", \$p"
fi
fi
fi
done < InstallOnly.list
echo "Packages that failed to schedule for install:"
echo "$failinstall"
echo "\$failinstall"
echo " * Restoring installed packages (please confirm)"
aptitude install
@ -105,7 +105,7 @@ if [[ "$flatpak" -eq 1 ]]; then
fi
echo "Packages that failed to schedule for install:"
echo "$failinstall"
echo "\$failinstall"
EOF
chmod ug+rx restore.sh
popd || exit 2