1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-20 11:11:03 -04:00
nix/scripts/maintenance/readcache.pm

22 lines
475 B
Perl
Raw Normal View History

2006-02-22 09:35:19 -05:00
package readcache;
use strict;
# Read the archive directories.
our %archives;
sub readDir {
my $dir = shift;
opendir(DIR, "$dir") or die "cannot open `$dir': $!";
my @as = readdir DIR;
foreach my $archive (@as) {
$archives{$archive} = "$dir/$archive";
}
closedir DIR;
}
readDir "/data/webserver/dist/nix-cache";
readDir "/data/webserver/dist/test-cache";
2006-02-22 09:35:19 -05:00
readDir "/data/webserver/dist/patches";
print STDERR scalar (keys %archives), "\n";