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/paclist.in | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'contrib/paclist.in') diff --git a/contrib/paclist.in b/contrib/paclist.in index 84144f78..c766c2c5 100755 --- a/contrib/paclist.in +++ b/contrib/paclist.in @@ -17,6 +17,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +declare -r myname='paclist' + export TEXTDOMAIN='pacman' export TEXTDOMAINDIR='/usr/share/locale' @@ -28,9 +30,9 @@ if ! type gettext &>/dev/null; then fi if [[ -z $1 ]]; then - printf '%s - List all packages installed from a given repo\n' "${0##*/}" - printf 'Usage: %s \n' "${0##*/}" - printf 'Example: %s testing\n' "${0##*/}" + printf '%s - List all packages installed from a given repo\n' "$myname" + printf 'Usage: %s \n' "$myname" + printf 'Example: %s testing\n' "$myname" exit 1 fi -- cgit v1.2.3-24-g4f1b