1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/coreconf/outofdate.pl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +#!/usr/local/bin/perl 1.5 +# 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +#Input: [-d dir] foo1.java foo2.java 1.11 +#Compares with: foo1.class foo2.class (if -d specified, checks in 'dir', 1.12 +# otherwise assumes .class files in same directory as .java files) 1.13 +#Returns: list of input arguments which are newer than corresponding class 1.14 +#files (non-existent class files are considered to be real old :-) 1.15 + 1.16 +$found = 1; 1.17 + 1.18 +if ($ARGV[0] eq '-d') { 1.19 + $classdir = $ARGV[1]; 1.20 + $classdir .= "/"; 1.21 + shift; 1.22 + shift; 1.23 +} else { 1.24 + $classdir = "./"; 1.25 +} 1.26 + 1.27 +foreach $filename (@ARGV) { 1.28 + $classfilename = $classdir; 1.29 + $classfilename .= $filename; 1.30 + $classfilename =~ s/.java$/.class/; 1.31 + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, 1.32 + $ctime,$blksize,$blocks) = stat($filename); 1.33 + ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$classmtime, 1.34 + $ctime,$blksize,$blocks) = stat($classfilename); 1.35 +# print $filename, " ", $mtime, ", ", $classfilename, " ", $classmtime, "\n"; 1.36 + if ($mtime > $classmtime) { 1.37 + print $filename, " "; 1.38 + $found = 0; 1.39 + } 1.40 +} 1.41 + 1.42 +print "\n";