chiark / gitweb /
sbuild: Rename the used-up .changes files to `.inmulti'
[dgit.git] / tests / tstunt / dpkg-parsechangelog
index 2e0360da112c2793532d752ff1bfc6944d782490..f1e75a88fa14320ae047fbba03f8e83f8fa78769 100755 (executable)
 # sys     0m0.012s
 # $
 
+$SIG{__WARN__} = sub { die $_[0]; }; # no use of system, so we avoid #793471
+
+my $infile = "debian/changelog";
+
+if (@ARGV && $ARGV[0] =~ s/^-l//) {
+    $infile = shift @ARGV;
+}
+
 die if @ARGV;
 
 use strict;
-open C, "debian/changelog" or die $!;
+open C, $infile or die $!;
 
 $!=0; $_ = <C>;
 m/^(\S+) \(([^()]+)\) (\S+)\; urgency=(\S+)$/ or die "$!, $_ ?";