X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Fpretend-pbuilder;fp=tests%2Fpretend-pbuilder;h=8495a2f74d9b6668919b939e6efcfb27540476a0;hb=e1d8c5971e9506c4bf8cdba37a1b7e69a494260e;hp=0000000000000000000000000000000000000000;hpb=e7f59af8133f6e80a4a18b171664af8517555360;p=dgit.git diff --git a/tests/pretend-pbuilder b/tests/pretend-pbuilder new file mode 100755 index 00000000..8495a2f7 --- /dev/null +++ b/tests/pretend-pbuilder @@ -0,0 +1,26 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Getopt::Long; + +my $operation = shift; +die "pbuilder: you should use me only to build, dgit" + unless ($operation eq "build" || $operation eq "b"); + +my $debbuildopts = undef; +my $distribution = undef; +GetOptions('debbuildopts=s' => \$debbuildopts, + 'distribution=s' => \$distribution); + +# ignore user args; last argument has to be the .dsc filename +my $dsc = $ARGV[-1]; +die "pbuilder: last argument has wrong file extension" + unless ($dsc =~ m/^(.*)_.*\.dsc$/); + +system "dpkg-source -x $dsc pbuilder"; +chdir 'pbuilder'; +system <