The following commit has been merged in the master branch:
commit 3b698110aa09af9a72843df19f9273f1b9a4d358
Author: James Vega <[email protected]>
Date: Thu Jun 2 20:20:15 2011 -0400
debsnap: Allow -a to be specified multiple times.
Signed-off-by: James Vega <[email protected]>
diff --git a/debian/changelog b/debian/changelog
index c3749dc..908735a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ devscripts (2.11.1) UNRELEASED; urgency=low
* debchange: Remove dapper from the list of recognized distributions.
* debcheckout: Handle Alioth's new anonymous access URLs when converting to
authenticated URLs. (Closes: #628674)
+ * debsnap: Allow -a to be specified multiple times. Thanks to Timo Juhani
+ Lindfors for the suggestion.
-- Benjamin Drung <[email protected]> Sun, 29 May 2011 18:41:13 +0200
diff --git a/scripts/debsnap.1 b/scripts/debsnap.1
index 5ad8afb..336003e 100644
--- a/scripts/debsnap.1
+++ b/scripts/debsnap.1
@@ -51,6 +51,8 @@ Download binary packages instead of source packages.
.TP
.BR \-a ", " \-\-architecture
Specify architecture of downloaded binary packages. Implies \fB\-\-binary\fP.
+This can be given multiple times in order to download binary packages for
+multiple architectures.
.TP
.BR \-h ", " \-\-help
diff --git a/scripts/debsnap.pl b/scripts/debsnap.pl
index 954d235..7778631 100755
--- a/scripts/debsnap.pl
+++ b/scripts/debsnap.pl
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
# Copyright © 2010, David Paleino <[email protected]>,
#
@@ -95,7 +95,8 @@ The following options are supported:
source packages
-a <architecture>,
--architecture <architecture> Specify architecture of binary
packages,
- implies --binary
+ implies --binary. May be given multiple
+ times
Default settings modified by devscripts configuration files or command-line
options:
@@ -201,7 +202,7 @@ sub verbose($)
read_conf(@ARGV);
Getopt::Long::Configure('gnu_compat');
Getopt::Long::Configure('no_ignore_case');
-GetOptions(\%opt, 'verbose|v', 'destdir|d=s', 'force|f', 'help|h', 'version',
'binary', 'architecture|a=s') || exit 1;
+GetOptions(\%opt, 'verbose|v', 'destdir|d=s', 'force|f', 'help|h', 'version',
'binary', 'architecture|a=s@') || exit 1;
usage(0) if $opt{help};
usage(1) unless @ARGV;
@@ -251,8 +252,8 @@ if ($opt{binary}) {
}
foreach my $result (@{$src_json->{result}}) {
- if ($opt{architecture}) {
- next if ($result->{architecture} ne $opt{architecture});
+ if (@{$opt{architecture}}) {
+ next unless (grep { $_ eq $result->{architecture} }
@{$opt{architecture}});
}
my $hash = $result->{hash};
my $fileinfo = @{$src_json->{fileinfo}{$hash}}[0];
--
Git repository for devscripts
--
To unsubscribe, send mail to [email protected].