diff options
author | Erich Eckner <git@eckner.net> | 2020-07-10 14:02:18 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-07-10 14:02:18 +0200 |
commit | 7eb3108442057bcd06840a6747580189ecc949c9 (patch) | |
tree | 1aa302f7b0ba19ffdbfb7b38ba0cc75d340d42f0 | |
parent | 20adebd5498be13af59f25f72be18d22e1fb7d47 (diff) | |
download | arch-mirror-7eb3108442057bcd06840a6747580189ecc949c9.tar.xz |
arch-mirror: only clean up if level-2 sync was successful
-rwxr-xr-x | arch-mirror | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch-mirror b/arch-mirror index ad20ad7..cf20ef4 100755 --- a/arch-mirror +++ b/arch-mirror @@ -300,8 +300,10 @@ if [ $# -eq 2 ] && [ "$1" = 'mirror' ]; then fi done } - >&2 printf 'clean up %s ...\n' "${to_sync}" - remove_unindexed_packages "${mirror_dir}${to_sync}" + if [ "${last_successful_level}" -eq 2 ]; then + >&2 printf 'clean up %s ...\n' "${to_sync}" + remove_unindexed_packages "${mirror_dir}${to_sync}" + fi >&2 printf '%s done.\n' "${to_sync}" exit |