fix: attempt to restore upgradepkg if install failed

This commit is contained in:
Eli Bosley
2024-11-06 15:11:51 -05:00
parent ff7e09e15c
commit 504283f227

View File

@@ -442,6 +442,12 @@ preserveAction() {
fi
}
# Check if upgradepkg does not exist and copy upgradepkg- to the path if it does not
if [[ ! -f /sbin/upgradepkg ]]; then
echo "upgradepkg not found, restoring from backup"
cp -f /sbin/upgradepkg- /sbin/upgradepkg
fi
# Loop through the array of preserveFilesDirs and perform actions
for obj in "${preserveFilesDirs[@]}"
do