my $infile = "debian/changelog";
+#print STDERR ">@ARGV<\n";
+
+my @orgargv = @ARGV;
+
if (@ARGV && $ARGV[0] =~ s/^-l//) {
$infile = shift @ARGV;
}
-die if @ARGV;
+if (@ARGV) {
+ my $strip = $0;
+ $strip =~ s#/[^/]+$## or die "$0 ?";
+ foreach my $k (qw(PATH PERLLIB)) {
+ my @opath = defined $ENV{$k} ? split /\:/, $ENV{$k} : ();
+ my @npath = grep { $_ ne $strip } @opath;
+ @npath != @opath or die "$0 $k ".($ENV{$k}//"(undef)")." ?";
+ $ENV{$k} = join ':', @npath;
+ delete $ENV{$k} if !@npath;
+ }
+ die if $ENV{'DGIT_NO_TSTUNT_CLPARSE'}++;
+ exec 'dpkg-parsechangelog', @orgargv;
+}
use strict;
open C, $infile or die $!;
Maintainer: $1
Date: $2
END
- last;
+ print "Timestamp: " or die $!;
+ exec qw(date +%s -d), $2; die $!;
} elsif (m/^ --\s*$/) {
last;
} elsif (!m/\S/) {