make_mirror.sh: test if debian-*.qcow exists before removing it

This commit is contained in:
Johannes Schauer Marin Rodrigues 2023-01-16 07:44:13 +01:00
parent 9945e65701
commit 3b953d4398
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -59,7 +59,9 @@ deletecache() {
esac esac
done done
for f in "$dir/debian-"*.qcow; do for f in "$dir/debian-"*.qcow; do
if [ -e "$f" ]; then
rm --one-file-system "$f" rm --one-file-system "$f"
fi
done done
if [ -e "$dir/debian/pool/main" ]; then if [ -e "$dir/debian/pool/main" ]; then
rm --one-file-system --recursive "$dir/debian/pool/main" rm --one-file-system --recursive "$dir/debian/pool/main"