add -f option to timestamp.pl (follow symlinks)
authorFelix Fietkau <nbd@openwrt.org>
Fri, 4 Aug 2006 21:42:29 +0000 (21:42 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 4 Aug 2006 21:42:29 +0000 (21:42 +0000)
SVN-Revision: 4457

openwrt/scripts/timestamp.pl

index 093ced9935bfbf5836829373c6bb1274d286a200..a3aa50cb0dffe23fbdcbf9f26da58d0328bcbe28 100755 (executable)
@@ -37,11 +37,13 @@ while (@ARGV > 0) {
        my $path = shift @ARGV;
        if ($path =~ /^-x/) {
                my $str = shift @ARGV;
-               $options{"-x"} .= " -and -not -path \\*".$str."\\*"
+               $options{"findopts"} .= " -and -not -path \\*".$str."\\*"
+       } elsif ($path =~ /^-f/) {
+               $options{"findopts"} .= " -follow";
        } elsif ($path =~ /^-/) {
                $options{$path} = 1;
        } else {
-               my ($tmp, $fname) = get_ts($path, $options{"-x"});
+               my ($tmp, $fname) = get_ts($path, $options{"findopts"});
                if ($tmp > $ts) {
                        if ($options{'-f'}) {
                                $n = $fname;