X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/d8af39f3e4177dcf1eaae8148e1578a75936cac0..e9b5e692d53f003042ced14f67a7f4603b77edea:/scripts/timestamp.pl diff --git a/scripts/timestamp.pl b/scripts/timestamp.pl index a4c5cae01..89ec4e70c 100755 --- a/scripts/timestamp.pl +++ b/scripts/timestamp.pl @@ -39,6 +39,9 @@ while (@ARGV > 0) { $options{"findopts"} .= " -and -not -path \\*".$str."\\*" } elsif ($path =~ /^-f/) { $options{"findopts"} .= " -follow"; + } elsif ($path =~ /^-n/) { + my $arg = $ARGV[0]; + $options{$path} = $arg; } elsif ($path =~ /^-/) { $options{$path} = 1; } else { @@ -54,7 +57,9 @@ while (@ARGV > 0) { } } -if ($options{"-p"}) { +if ($options{"-n"}) { + exit ($n eq $options{"-n"} ? 0 : 1); +} elsif ($options{"-p"}) { print "$n\n"; } elsif ($options{"-t"}) { print "$ts\n";