[SCM] Git repository for devscripts branch, master, updated. v2.12.4-154-g11c33e2

Benjamin Drung bdrung at debian.org
Sun Feb 17 16:04:02 UTC 2013


The following commit has been merged in the master branch:
commit 11c33e29d9658c16dfc409485339e4a5303d6fec
Author: Benjamin Drung <bdrung at debian.org>
Date:   Sun Feb 17 17:03:51 2013 +0100

    wnpp-alert: Support using curl as alternative to wget.
    
    Closes: #690056

diff --git a/README b/README
index b6b0287..95d2229 100644
--- a/README
+++ b/README
@@ -241,7 +241,7 @@ And now, in mostly alphabetical order, the scripts:
   archive [gnupg, debian-keyring, debian-maintainers, wget]
 
 - wnpp-alert: list installed packages which are orphaned or up for adoption
-  [wget]
+  [wget | curl]
 
 - wnpp-check: check whether there is an open request for packaging or
   intention to package bug for a package [wget | curl]
diff --git a/debian/changelog b/debian/changelog
index aedaae3..080769c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -83,6 +83,7 @@ devscripts (2.13.0) UNRELEASED; urgency=low
     + check for the use of $GLOBIGNORE
 
   [ Regid Ichira ]
+  * wnpp-alert: Support using curl as alternative to wget. (Closes: #690056)
   * 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
diff --git a/debian/control b/debian/control
index 1cd4c26..55b8d29 100644
--- a/debian/control
+++ b/debian/control
@@ -198,7 +198,7 @@ Description: scripts to make the life of a Debian Package maintainer easier
   - who-uploads: determine the most recent uploaders of a package to the Debian
     archive [gnupg, debian-keyring, debian-maintainers, wget]
   - wnpp-alert: list installed packages which are orphaned or up for adoption
-    [wget]
+    [wget | curl]
   - wnpp-check: check whether there is an open request for packaging or
     intention to package bug for a package [wget | curl]
   - wrap-and-sort: wrap long lines and sort items in packaging files
diff --git a/scripts/wnpp-alert.sh b/scripts/wnpp-alert.sh
index f34f06e..d1129b0 100755
--- a/scripts/wnpp-alert.sh
+++ b/scripts/wnpp-alert.sh
@@ -16,6 +16,8 @@
 PROGNAME=`basename $0`
 CACHEDIR=~/.devscripts_cache
 CACHEDDIFF="${CACHEDIR}/wnpp-diff"
+CURLORWGET=""
+GETCOMMAND=""
 
 usage () { echo \
 "Usage: $PROGNAME [--help|-h|--version|-v|--diff|-d] [package ...]
@@ -52,8 +54,14 @@ wnppdiff () {
 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 ! 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
 
@@ -84,16 +92,16 @@ fi
 # matching lines and then processing them, this attempts to sed
 # 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/orphaned || \
-    { echo "wnpp-alert: wget http://www.debian.org/devel/wnpp/orphaned failed" >&2; exit 1; }
+$GETCOMMAND $WNPPTMP http://www.debian.org/devel/wnpp/orphaned || \
+    { echo "wnpp-alert: $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
 
-wget -q -O $WNPPTMP http://www.debian.org/devel/wnpp/rfa_bypackage || \
-    { echo "wnpp-alert: wget http://www.debian.org/devel/wnpp/rfa_bypackage" >&2; exit 1; }
+$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; }
 sed -ne 's/.*<li><a href="http:\/\/bugs.debian.org\/\([0-9]*\)">\([^:<]*\)[: ]*\([^<]*\)<\/a>.*/RFA \1 \2 -- \3/; T d; p; : d' $WNPPTMP >> $WNPP
 
-wget -q -O $WNPPTMP http://www.debian.org/devel/wnpp/help_requested || \
-    { echo "wnpp-alert: wget http://www.debian.org/devel/wnpp/help_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" >&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



More information about the devscripts-devel mailing list