1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-07 14:21:48 +02:00

* Fix nix-channel.

* Add `--help' flag; fixes NIX-5.
* Add `--remove' flag; fixes NIX-6.
* Add `--list' flag.
This commit is contained in:
Eelco Dolstra 2005-02-17 10:06:12 +00:00
parent 202d5bbda5
commit fb5dae8694
2 changed files with 65 additions and 27 deletions

View file

@ -154,17 +154,17 @@ for (my $n = 0; $n < scalar @storePaths; $n++) {
(-f $narfile) or die "narfile for $storePath not found";
push @nararchives, $narfile;
open MD5, "$nardir/narbz2-hash" or die "cannot open narbz2-hash";
my $narbz2Hash = <MD5>;
open SHA1, "$nardir/narbz2-hash" or die "cannot open narbz2-hash";
my $narbz2Hash = <SHA1>;
chomp $narbz2Hash;
$narbz2Hash =~ /^[0-9a-z]{32}$/ or die "invalid hash";
close MD5;
close SHA1;
open MD5, "$nardir/nar-hash" or die "cannot open nar-hash";
my $narHash = <MD5>;
open SHA1, "$nardir/nar-hash" or die "cannot open nar-hash";
my $narHash = <SHA1>;
chomp $narHash;
$narHash =~ /^[0-9a-z]{32}$/ or die "invalid hash";
close MD5;
close SHA1;
my $narbz2Size = (stat $narfile)[7];