copr-keygen: backup: remove correct file

And produce no stderr in cronjob to avoid unnecessary emails sent
(hourly) by cron.
This commit is contained in:
Pavel Raiskup 2020-05-12 06:17:54 +02:00
parent f3f74c5e7c
commit 3f0f67f440

View file

@ -15,9 +15,6 @@ tar --exclude="*agent*" -czPf - "$PATH_TO_KEYRING_DIR" \
# shell pattern matching provides sorted output
previous=
for file in "$BACKUP_DIR"/*; do
if test -n "$previous"; then
echo >&2 "removing $file"
rm "$file"
fi
test -z "$previous" || rm "$previous"
previous=$file
done