Fixed bug on output restore.sh
This commit is contained in:
parent
74a0096bbc
commit
eef46c38ca
1 changed files with 10 additions and 10 deletions
|
@ -76,25 +76,25 @@ flatpak=0
|
||||||
echo " * Gathering installed packages"
|
echo " * Gathering installed packages"
|
||||||
#xargs aptitude --schedule-only install < InstallOnly.list
|
#xargs aptitude --schedule-only install < InstallOnly.list
|
||||||
while read p; do
|
while read p; do
|
||||||
if [[ "$p" = "flatpak" ]]; then
|
if [[ "\$p" = "flatpak" ]]; then
|
||||||
flatpak=1
|
flatpak=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dpkg-query -s "$p" &>/dev/null
|
dpkg-query -s "\$p" &>/dev/null
|
||||||
if [[ "$?" -eq 1 ]]; then
|
if [[ "\$?" -eq 1 ]]; then
|
||||||
aptitude --schedule-only install "$p"
|
aptitude --schedule-only install "\$p"
|
||||||
if [[ "$?" -ne 0 ]]; then
|
if [[ "\$?" -ne 0 ]]; then
|
||||||
if [[ -z "$failinstall" ]]; then
|
if [[ -z "\$failinstall" ]]; then
|
||||||
failinstall+="$p"
|
failinstall+="\$p"
|
||||||
else
|
else
|
||||||
failinstall+=", $p"
|
failinstall+=", \$p"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done < InstallOnly.list
|
done < InstallOnly.list
|
||||||
|
|
||||||
echo "Packages that failed to schedule for install:"
|
echo "Packages that failed to schedule for install:"
|
||||||
echo "$failinstall"
|
echo "\$failinstall"
|
||||||
|
|
||||||
echo " * Restoring installed packages (please confirm)"
|
echo " * Restoring installed packages (please confirm)"
|
||||||
aptitude install
|
aptitude install
|
||||||
|
@ -105,7 +105,7 @@ if [[ "$flatpak" -eq 1 ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Packages that failed to schedule for install:"
|
echo "Packages that failed to schedule for install:"
|
||||||
echo "$failinstall"
|
echo "\$failinstall"
|
||||||
EOF
|
EOF
|
||||||
chmod ug+rx restore.sh
|
chmod ug+rx restore.sh
|
||||||
popd || exit 2
|
popd || exit 2
|
||||||
|
|
Loading…
Reference in a new issue