From 8253daf403701c41fdd7cbc8da173b6fd3992db6 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Marin Rodrigues Date: Sun, 5 Mar 2023 17:43:54 +0100 Subject: [PATCH] make_mirror.sh: also delete mmdebstrap-*-*.* --- make_mirror.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/make_mirror.sh b/make_mirror.sh index d420066..dfd6fe8 100755 --- a/make_mirror.sh +++ b/make_mirror.sh @@ -27,6 +27,15 @@ deletecache() { else echo "does not exist: $dir/debian-$dist-$variant.tar" >&2 fi + for format in tar ext2 squashfs; do + if [ -e "$dir/mmdebstrap-$dist-$variant.$format" ]; then + # attempt to delete for all dists because DEFAULT_DIST might've been different the last time + rm "$dir/mmdebstrap-$dist-$variant.$format" + elif [ "$dist" = "$DEFAULT_DIST" ]; then + # only warn about non-existance when it's expected to exist + echo "does not exist: $dir/mmdebstrap-$dist-$variant.$format" >&2 + fi + done done if [ -e "$dir/debian/dists/$dist" ]; then rm --one-file-system --recursive "$dir/debian/dists/$dist"