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"
|
||||
#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
|
||||
|
|
Loading…
Reference in a new issue