summaryrefslogtreecommitdiff
path: root/cron-jobs/ftpdir-cleanup
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-08-13 09:47:31 +0200
committerPierre Schmitz <pierre@archlinux.de>2010-08-13 09:47:31 +0200
commita422060414670bb49d2422a38467b73ae01e7ecb (patch)
treef67c7216398ea6bf0aced46828235ca07fdbcf90 /cron-jobs/ftpdir-cleanup
parente2c005b490df6762e23da3223944151c17d1de80 (diff)
Use common functions to print messages, warnings and errors
These functions are copied from makepkg
Diffstat (limited to 'cron-jobs/ftpdir-cleanup')
-rwxr-xr-xcron-jobs/ftpdir-cleanup8
1 files changed, 3 insertions, 5 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 7668ab5..3456e9c 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -29,13 +29,11 @@ done
popd >/dev/null
if [ -n "$to_cleanup" ]; then
- echo " The following packages are no longer in any repo"
- echo " They will be moved to $CLEANUP_DESTDIR"
+ msg "The following packages are no longer in any repo"
for f in $to_cleanup; do
- echo " $(basename "$f")"
+ msg2 "$(basename "$f")"
done
- echo ""
- mv $to_cleanup "$CLEANUP_DESTDIR"
+ ${CLEANUP_DRYRUN} || mv $to_cleanup "$CLEANUP_DESTDIR"
fi
script_unlock