From 1c020e8773dd48c98b00117619d923484785e215 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Wed, 19 Nov 2003 22:43:05 +0000 Subject: i do suck much --- move/tools/scan-etc.pl | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'move/tools/scan-etc.pl') diff --git a/move/tools/scan-etc.pl b/move/tools/scan-etc.pl index 7a2c046cb..66415d4de 100755 --- a/move/tools/scan-etc.pl +++ b/move/tools/scan-etc.pl @@ -12,20 +12,9 @@ use MDK::Common; -sub date_to_raw { - my ($y, $m, $d, $h, $mi, $s) = $_[0] =~ /\s(\d+)-(\d+)-(\d+)\s(\d+):(\d+):(\d+)\./; - ($y-1970)*32140800 + $m*2678400 + $d*86400 + $h*3600 + $mi*60 + $s; -} - sub stat_ { - my ($f) = @_; - - my (undef, undef, undef, undef, $a, $m, $c) = `stat $f`; - - my $araw = date_to_raw($a); - my $mraw = max(date_to_raw($m), date_to_raw($c)); - - [ $araw, $mraw ]; + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat $_[0]; + [ $atime, max($mtime, $ctime) ]; } our $reference = (stat_('/dummy'))->[0]; -- cgit v1.2.1