The following commit has been merged in the master branch:
commit 966da3ca871720f6e8716d93647f35912c95abc3
Author: Benjamin Drung <[email protected]>
Date:   Sun Feb 17 17:16:27 2013 +0100

    wnpp-alert: Do not hard-code program name.

diff --git a/scripts/wnpp-alert.sh b/scripts/wnpp-alert.sh
index d1129b0..530b3a7 100755
--- a/scripts/wnpp-alert.sh
+++ b/scripts/wnpp-alert.sh
@@ -13,7 +13,7 @@
 # And I (Julian) tried it with Perl's LWP, but this is _much_ faster
 # (startup time is huge).  And even Perl with wget is slower by 50%....
 
-PROGNAME=`basename $0`
+PROGNAME="${0##*/}"
 CACHEDIR=~/.devscripts_cache
 CACHEDDIFF="${CACHEDIR}/wnpp-diff"
 CURLORWGET=""
@@ -93,15 +93,15 @@ fi
 # every line; those which succeed execute the 'p' command, those
 # which don't skip over it to the label 'd'
 $GETCOMMAND $WNPPTMP http://www.debian.org/devel/wnpp/orphaned || \
-    { echo "wnpp-alert: $CURLORWGET http://www.debian.org/devel/wnpp/orphaned 
failed" >&2; exit 1; }
+    { echo "$PROGNAME: $CURLORWGET http://www.debian.org/devel/wnpp/orphaned 
failed" >&2; exit 1; }
 sed -ne 's/.*<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:<]*\)[: 
]*\([^<]*\)<\/a>.*/O \1 \2 -- \3/; T d; p; : d' $WNPPTMP > $WNPP
 
 $GETCOMMAND $WNPPTMP http://www.debian.org/devel/wnpp/rfa_bypackage || \
-    { echo "wnpp-alert: $CURLORWGET 
http://www.debian.org/devel/wnpp/rfa_bypackage"; >&2; exit 1; }
+    { echo "$PROGNAME: $CURLORWGET 
http://www.debian.org/devel/wnpp/rfa_bypackage"; >&2; exit 1; }
 sed -ne 's/.*<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:<]*\)[: 
]*\([^<]*\)<\/a>.*/RFA \1 \2 -- \3/; T d; p; : d' $WNPPTMP >> $WNPP
 
 $GETCOMMAND $WNPPTMP http://www.debian.org/devel/wnpp/help_requested || \
-    { echo "wnpp-alert: $CURLORWGET 
http://www.debian.org/devel/wnpp/help_requested"; >&2; exit 1; }
+    { echo "$PROGNAME: $CURLORWGET 
http://www.debian.org/devel/wnpp/help_requested"; >&2; exit 1; }
 sed -ne 's/.*<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:<]*\)[: 
]*\([^<]*\)<\/a>.*/RFH \1 \2 -- \3/; T d; p; : d' $WNPPTMP >> $WNPP
 
 cut -f3 -d' ' $WNPP | sort > $WNPP_PACKAGES

-- 
Git repository for devscripts

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to