From 5c7220a4aa370d1f726eb27d99d8f9294646433d Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Mon, 19 Dec 2011 14:40:07 +0100 Subject: Avoid calls to basename --- cron-jobs/ftpdir-cleanup | 2 +- cron-jobs/integrity-check | 2 +- cron-jobs/update-web-db | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'cron-jobs') diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup index bb1661a..7839d50 100755 --- a/cron-jobs/ftpdir-cleanup +++ b/cron-jobs/ftpdir-cleanup @@ -16,7 +16,7 @@ clean_pkg() { if [ -e "$pkg.sig" ]; then mv -f "$pkg.sig" "$CLEANUP_DESTDIR" fi - touch "${CLEANUP_DESTDIR}/$(basename ${pkg})" + touch "${CLEANUP_DESTDIR}/${pkg##*/}" fi done fi diff --git a/cron-jobs/integrity-check b/cron-jobs/integrity-check index d4f9694..044f093 100755 --- a/cron-jobs/integrity-check +++ b/cron-jobs/integrity-check @@ -8,7 +8,7 @@ dirname="$(dirname $0)" script_lock if [ $# -ne 1 ]; then - die "usage: $(basename $0) " + die "usage: ${0##*/} " fi mailto=$1 diff --git a/cron-jobs/update-web-db b/cron-jobs/update-web-db index 6ced4c1..b1767ca 100755 --- a/cron-jobs/update-web-db +++ b/cron-jobs/update-web-db @@ -14,7 +14,7 @@ REPOS=('community-testing' 'multilib-testing' 'multilib' 'community' 'extra' 'te LOGOUT="/tmp/archweb_update.log" # figure out what operation to perform -cmd="$(basename $0)" +cmd="${0##*/}" if [[ $cmd != "update-web-db" && $cmd != "update-web-files-db" ]]; then die "Invalid command name '$cmd' specified!" fi -- cgit v1.2.3