Contents of /tags/mkinitrd-6_0_7/mkinitrd-magellan/isolinux/now.pl
Parent Directory | Revision Log
Revision 710 -
(show annotations)
(download)
Thu Apr 10 20:28:31 2008 UTC (16 years, 5 months ago) by (unknown author)
File MIME type: text/plain
File size: 496 byte(s)
Thu Apr 10 20:28:31 2008 UTC (16 years, 5 months ago) by (unknown author)
File MIME type: text/plain
File size: 496 byte(s)
This commit was manufactured by cvs2svn to create tag 'mkinitrd-6_0_7'.
1 | #!/usr/bin/perl |
2 | # $Id: now.pl,v 1.1 2007-09-01 22:44:05 niro Exp $ |
3 | # |
4 | # Print the time (possibly the mtime of a file) as a hexadecimal integer |
5 | # If more than one file, print the mtime of the *newest* file. |
6 | # |
7 | |
8 | undef $now; |
9 | |
10 | foreach $file ( @ARGV ) { |
11 | ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime, |
12 | $ctime,$blksize,$blocks) = stat($file); |
13 | if ( !defined($now) || $now < $mtime ) { |
14 | $now = $mtime; |
15 | } |
16 | } |
17 | |
18 | if ( !defined($now) ) { |
19 | $now = time; |
20 | } |
21 | |
22 | printf "0x%08x\n", $now; |