]> git.donarmstrong.com Git - wannabuild.git/commitdiff
merge-v3: allow to specify %ARCH% and %SUITE% in file on the command line
authorAndreas Barth <aba@not.so.argh.org>
Fri, 4 Jun 2010 13:17:38 +0000 (13:17 +0000)
committerAndreas Barth <aba@not.so.argh.org>
Fri, 4 Jun 2010 13:17:38 +0000 (13:17 +0000)
bin/wanna-build

index 232b0b5b98d70dc8259f81d4bcf0d398e885b948..3417a4d1877c2dceb5c504aef7fc16f94358073f 100755 (executable)
@@ -107,6 +107,7 @@ elsif ($progname =~ /^list-(.*)$/) {
 
 my %options =
        (# flags
+        simulate       => { flag => \$simulate }, # this is not supported by all operations (yet)!
         verbose        => { short => "v", flag => \$verbose },
         override               => { short => "o", flag => \$opt_override },
         "create-db"    => { flag => \$opt_create_db },
@@ -493,6 +494,8 @@ sub process {
                         # call with installed-packages+ . installed-sources+ [ . available-for-build-packages+ ]
                         # in case available-for-build-packages is not specified, installed-packages are used
                         lock_table() unless $simulate;
+                        my $replacemap = { '%ARCH%' => $arch, '%SUITE%' => $distribution };
+                        map { my $k = $_; grep { $k =~ s,$_,$replacemap->{$_}, } keys %{$replacemap}; $_ = $k; } @ARGV;
                         my @ipkgs = &parse_argv( \@ARGV, '.');
                         my @isrcs = &parse_argv( \@ARGV, '.');
                         my @bpkgs = &parse_argv( \@ARGV, '.');