Author: adam-guest
Date: 2008-08-05 19:12:50 +0000 (Tue, 05 Aug 2008)
New Revision: 1581

Modified:
   trunk/debian/changelog
   trunk/scripts/debsign.sh
Log:
debsign: When copying .changes files from a remote host, attempt to process
each copied file if a wildcard was used in the filename (Closes: #491627)

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-07-28 19:07:15 UTC (rev 1580)
+++ trunk/debian/changelog      2008-08-05 19:12:50 UTC (rev 1581)
@@ -1,6 +1,7 @@
 devscripts (2.10.36) UNRELEASED; urgency=low
 
-  * NOT RELEASED YET
+  * debsign: When copying .changes files from a remote host, attempt to process
+    each copied file if a wildcard was used in the filename (Closes: #491627)
 
  -- Adam D. Barratt <[EMAIL PROTECTED]>  Mon, 28 Jul 2008 20:06:49 +0100
 

Modified: trunk/scripts/debsign.sh
===================================================================
--- trunk/scripts/debsign.sh    2008-07-28 19:07:15 UTC (rev 1580)
+++ trunk/scripts/debsign.sh    2008-08-05 19:12:50 UTC (rev 1581)
@@ -338,7 +338,10 @@
     if [ -n "$remotehost" ]
     then
        cd ${TMPDIR:-/tmp}
-       mkdir debsign.$$ || { echo "$PROGNAME: Can't mkdir!" >&2; exit 1; }
+       if [ ! -d "debsign.$$" ]
+       then
+           mkdir debsign.$$ || { echo "$PROGNAME: Can't mkdir!" >&2; exit 1; }
+       fi
        trap "cleanup_tmpdir" 0 1 2 3 7 10 13 15
        cd debsign.$$
 
@@ -351,11 +354,27 @@
        commands=`basename "$commands"`
 
        if [ -n "$changes" ]
-       then withecho scp "$remotehost:$remotechanges" "$changes"
+       then
+           if [ ! -f "$changes" ]
+           then
+               withecho scp "$remotehost:$remotechanges" .
+           fi
        elif [ -n "$dsc" ]
        then withecho scp "$remotehost:$remotedsc" "$dsc"
        else withecho scp "$remotehost:$remotecommands" "$commands"
        fi
+
+       if [ -n "$changes" ] && echo "$changes" | grep -q "\*"
+       then
+           for changes in $changes
+           do
+               printf "\n"
+               dsc=`echo $changes | \
+                   perl -pe 's/\.changes$/.dsc/; 
s/(.*)_(.*)_(.*)\.dsc/\1_\2.dsc/'`
+               dosigning;
+           done
+           exit 0;
+       fi
     fi
 
     if [ -n "$changes" ]



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to