From 1038e669649dae98c1cf9c354e680c62cf25638c Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 6 Dec 2011 22:29:32 +0100 Subject: contrib/*: Hardcode program names Add a read-only variable "$myname" to every contrib script and hardcode program names instead of relying on "$0". The variable name "$myname" was chosen because it is already used in pacman and because we use "$myver" to specify the program version in the official scripts. Signed-off-by: Lukas Fleischer Signed-off-by: Dan McGee --- contrib/paccache.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'contrib/paccache.in') diff --git a/contrib/paccache.in b/contrib/paccache.in index eae547dc..847d44fb 100755 --- a/contrib/paccache.in +++ b/contrib/paccache.in @@ -20,6 +20,8 @@ shopt -s extglob +declare -r myname='paccache' + declare -a candidates=() cmdopts=() whitelist=() blacklist=() declare -i delete=0 dryrun=0 filecount=0 move=0 needsroot=0 totalsaved=0 verbose=0 declare cachedir=@localstatedir@/cache/pacman/pkg delim=$'\n' keep=3 movedir= scanarch= @@ -174,9 +176,9 @@ summarize() { usage() { cat < [options] [targets...] +usage: $myname [options] [targets...] -${0##*/} is a flexible pacman cache cleaning utility, which has numerous +$myname is a flexible pacman cache cleaning utility, which has numerous options to help control how much, and what, is deleted from any directory containing pacman package tarballs. -- cgit v1.2.3