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
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue