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:
parent
f3f74c5e7c
commit
3f0f67f440
1 changed files with 1 additions and 4 deletions
|
@ -15,9 +15,6 @@ tar --exclude="*agent*" -czPf - "$PATH_TO_KEYRING_DIR" \
|
||||||
# shell pattern matching provides sorted output
|
# shell pattern matching provides sorted output
|
||||||
previous=
|
previous=
|
||||||
for file in "$BACKUP_DIR"/*; do
|
for file in "$BACKUP_DIR"/*; do
|
||||||
if test -n "$previous"; then
|
test -z "$previous" || rm "$previous"
|
||||||
echo >&2 "removing $file"
|
|
||||||
rm "$file"
|
|
||||||
fi
|
|
||||||
previous=$file
|
previous=$file
|
||||||
done
|
done
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue