forked from lix-project/lix
18 lines
368 B
Perl
Executable file
18 lines
368 B
Perl
Executable file
#! /usr/bin/perl -w
|
|
|
|
my $dir = $ARGV[0];
|
|
|
|
foreach my $prebuilt (glob("$dir/*.tar.bz2")) {
|
|
|
|
$prebuilt =~ /-([a-z0-9]+)-([a-z0-9]+).tar.bz2$/
|
|
|| die "invalid file name: $prebuilt";
|
|
|
|
my $pkgHash = $1;
|
|
my $prebuiltHash = $2;
|
|
|
|
print "$pkgHash -> $prebuiltHash\n";
|
|
|
|
system "nix regprebuilt $pkgHash $prebuiltHash";
|
|
system "nix regfile $prebuilt";
|
|
}
|