9 die "pbuilder: you should use me only to build, dgit"
10 unless ($operation eq "build" || $operation eq "b");
12 my $debbuildopts = undef;
13 my $distribution = undef;
14 GetOptions('debbuildopts=s' => \$debbuildopts,
15 'distribution=s' => \$distribution)
18 # ignore user args; last argument has to be the .dsc filename
20 die "pbuilder: last argument has wrong file extension"
21 unless ($dsc =~ m/^(.*)_.*\.dsc$/);
23 system "dpkg-source -x $dsc pbuilder";
26 dpkg-buildpackage --changes-option=-DDistribution=$distribution $debbuildopts