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: josch
GPG key ID: F2CBA5C78FBD83E1

View file

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