From eef46c38cab43017145eba282b54d597f33767f7 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sat, 23 Sep 2023 16:13:00 -0400 Subject: [PATCH] Fixed bug on output restore.sh --- scripts/os_debian | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/scripts/os_debian b/scripts/os_debian index a1e30cd..6b4ba3d 100755 --- a/scripts/os_debian +++ b/scripts/os_debian @@ -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