Install backups are pruned oldest first by time, not by name

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-23 09:12:36 +00:00
co-authored by Claude Opus 5.5
parent bdc4fbab94
commit 92784bb3d3
+1 -1
View File
@@ -38,6 +38,6 @@ COPIES=$($A -s $D shell "dumpsys activity activities | grep -c 'Hist.*tv.orbit.c
echo "now $NOW, copies of Orbit running: $COPIES"
snap after
python3 "$TOOLS/compare_snapshots.py" "$B/before" "$B/after"; RESULT=$?
ls -d "$OT/backups/${PFX}install-"* 2>/dev/null | sort | head -n -3 | xargs -r rm -rf
ls -dt "$OT/backups/${PFX}install-"* 2>/dev/null | tail -n +4 | xargs -r rm -rf
[ "$NOW" = "$NEW" ] && { [ "$COPIES" = "1" ] || [ "${NO_LAUNCH:-0}" = "1" ]; } && [ $RESULT -eq 0 ] && { echo "Install checked out."; exit 0; }
echo "Install needs a look (version $NOW, copies $COPIES, comparison exit $RESULT)."; exit 3