[SCM] Git repository for devscripts branch, master, updated. v2.12.4-150-gf36b3dd

Benjamin Drung bdrung at debian.org
Sun Feb 17 14:40:29 UTC 2013


The following commit has been merged in the master branch:
commit f36b3dd03c33c37e5c4d78f9e77aaf09158abd12
Author: Benjamin Drung <bdrung at debian.org>
Date:   Sun Feb 17 15:40:14 2013 +0100

    wnpp-check: Support using curl as alternative to wget.
    
    Closes: #690059

diff --git a/README b/README
index 8b25760..e9c9af6 100644
--- a/README
+++ b/README
@@ -243,7 +243,7 @@ And now, in mostly alphabetical order, the scripts:
   [wget]
 
 - wnpp-check: check whether there is an open request for packaging or
-  intention to package bug for a package [wget]
+  intention to package bug for a package [wget | curl]
 
 - wrap-and-sort: wrap long lines and sort items in packaging files
   [python-debian]
diff --git a/debian/changelog b/debian/changelog
index 21fa206..aedaae3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -82,6 +82,9 @@ devscripts (2.13.0) UNRELEASED; urgency=low
     + check for case modification expansions
     + check for the use of $GLOBIGNORE
 
+  [ Regid Ichira ]
+  * wnpp-check: Support using curl as alternative to wget. (Closes: #690059)
+
  -- James McCoy <jamessan at debian.org>  Sat, 15 Sep 2012 16:12:16 -0400
 
 devscripts (2.12.6) unstable; urgency=low
diff --git a/scripts/wnpp-check.sh b/scripts/wnpp-check.sh
index b3858db..e763fa8 100755
--- a/scripts/wnpp-check.sh
+++ b/scripts/wnpp-check.sh
@@ -10,6 +10,8 @@
 
 PROGNAME=`basename $0`
 PACKAGES="$@"
+CURLORWGET=""
+GETCOMMAND=""
 
 usage () { echo \
 "Usage: $PROGNAME <package name> [...]
@@ -33,8 +35,14 @@ if [ "x$1" = "x--help" -o "x$1" = "x-h" ]; then usage; exit 0; fi
 if [ "x$1" = "x--version" -o "x$1" = "x-v" ]; then version; exit 0; fi
 if [ "x$1" = "x" ]; then usage; exit 1; fi
 
-if ! command -v wget >/dev/null 2>&1; then
-    echo "$PROGNAME: need the wget package installed to run this" >&2
+if command -v wget >/dev/null 2>&1; then
+    CURLORWGET="wget"
+    GETCOMMAND="wget -q -O"
+elif command -v curl >/dev/null 2>&1; then
+    CURLORWGET="curl"
+    GETCOMMAND="curl -qs -o"
+else
+    echo "$PROGNAME: need either the wget or curl package installed to run this" >&2
     exit 1
 fi
 
@@ -50,12 +58,12 @@ trap "rm -f '$WNPP' '$WNPPTMP' '$WNPP_PACKAGES'" \
 # every line; those which succeed execute the 'p' command, those
 # which don't skip over it to the label 'd'
 
-wget -q -O $WNPPTMP http://www.debian.org/devel/wnpp/being_packaged || \
-    { echo "wnpp-check: wget http://www.debian.org/devel/wnpp/being_packaged failed" >&2; exit 1; }
+$GETCOMMAND $WNPPTMP http://www.debian.org/devel/wnpp/help_requested || \
+    { echo "wnpp-alert: $CURLORWGET http://www.debian.org/devel/wnpp/help_requested failed." >&2; exit 1; }
 sed -ne 's/.*<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:<]*\)[: ]*\([^<]*\)<\/a>.*/ITP \1 \2 -- \3/; T d; p; : d' $WNPPTMP > $WNPP
 
-wget -q -O $WNPPTMP http://www.debian.org/devel/wnpp/requested || \
-    { echo "wnpp-check: wget http://www.debian.org/devel/wnpp/requested" >&2; exit 1; }
+$GETCOMMAND $WNPPTMP http://www.debian.org/devel/wnpp/help_requested || \
+    { echo "wnpp-alert: $CURLORWGET http://www.debian.org/devel/wnpp/help_requested failed." >&2; exit 1; }
 sed -ne 's/.*<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:<]*\)[: ]*\([^<]*\)<\/a>.*/RFP \1 \2 -- \3/; T d; p; : d' $WNPPTMP >> $WNPP
 
 awk -F' ' '{print $3" ("$1" - #"$2")"}' $WNPP | sort > $WNPP_PACKAGES

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list