Skip to content

Commit

Permalink
Fix backup update overwrite on already-patched system (edge case)
Browse files Browse the repository at this point in the history
  • Loading branch information
mayankk2308 committed Apr 11, 2018
1 parent 32cdb16 commit 52d01a7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions purge-wrangler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,18 @@ backup_system()
else
echo "Different build/version of macOS detected. Updating backup...\n"
rm -r "$backup_agc"
if [[ "$patch_status" == 1 ]]
then
echo "Uninstalling patch before backup update...\n"
echo "Re-running script...\n"
sleep 3
"$0" "uninstall" "-f"
echo "System re-patched.\n"
echo "Re-running script...\n"
sleep 3
"$0" "$operation" "$advanced_operation"
exit
fi
execute_backup
echo "Update complete.\n"
fi
Expand Down

0 comments on commit 52d01a7

Please sign in to comment.