3 # Written by Balazs Nagy (julian7@kva.hu) 1998
4 # locale bugfix by Michal Svec (rebel@penguin.cz) 2000
5 # (C) 1998 The Free Software Foundation.
9 # override any locale for dates
10 delete $ENV{"LC_ALL"};
13 #print $ENV{"LC_ALL"};
20 $dt =~ s/^\w+ (\w+) (\d+) (\d+:\d+):\d+ .+\n?$/$1 $2 $3/;
28 my (@rpms, %files, $i, $fn, $dn, $sz, $bt);
29 # @rpms = `rpm -qa --qf "\%{NAME}-\%{VERSION}-\%{RELEASE}:\%{GROUP}:\%{SIZE}:\%{BUILDTIME:date}\n"`;
30 @rpms = `rpm -qa --qf "\%{NAME}-\%{VERSION}:\%{GROUP}:\%{SIZE}:\%{BUILDTIME:date}\n"`;
36 if ($i =~ /^([^:]+):([^:]+):([^:]+):(.+)$/) {
37 ($fn, $dn, $sz, $bt) = ($1, $2, $3, $4);
39 if (defined $files{$dn}) {
40 push(@{$files{$dn}}, $fn);
42 @{$files{$dn}} = ($fn);
45 $dates{$fn} = gd($bt);
48 for $i (sort keys %files) {
49 print "dr-xr-xr-x 1 0 0 0 $DATE $i/\n";
50 for $fn (sort @{$files{$i}}) {
51 print "-r--r--r-- 1 0 0 $sizes{$fn} $dates{$fn} $i/$fn.trpm\n";
64 if ($ARGV[0] eq "list") { list(); exit(0); }
65 elsif ($ARGV[0] eq "copyout") { open O, ">$ARGV[3]"; print O $ARGV[2], "\n"; close O; exit(0); }