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/pacsearch.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'contrib/pacsearch.in') diff --git a/contrib/pacsearch.in b/contrib/pacsearch.in index db9d6ad1..794110eb 100755 --- a/contrib/pacsearch.in +++ b/contrib/pacsearch.in @@ -24,13 +24,13 @@ use strict; use warnings; -my $progname = "pacsearch"; +my $myname = 'pacsearch'; my $version = "2.0"; if ($#ARGV lt 0 || $ARGV[0] eq "--help" || $ARGV[0] eq "-h") { - print "$progname - Add color and install information to a pacman -Ss search\n"; - print "Usage: $progname \n"; - print "Example: $progname ^gnome\n"; + print "$myname - Add color and install information to a pacman -Ss search\n"; + print "Usage: $myname \n"; + print "Example: $myname ^gnome\n"; if ($#ARGV lt 0) { exit 1; } @@ -38,7 +38,7 @@ if ($#ARGV lt 0 || $ARGV[0] eq "--help" || $ARGV[0] eq "-h") { } if ($ARGV[0] eq "--version" || $ARGV[0] eq "-v") { - print "$progname version $version\n"; + print "$myname version $version\n"; print "Copyright (C) 2006-2011 Dan McGee\n"; exit 0; } -- cgit v1.2.3-70-g09d2