Merge pull request #17 from samueldr/sha256sum-check

Adds filename to sha256 file for use with `sha256 -c`
This commit is contained in:
Eelco Dolstra 2018-06-13 17:41:06 +02:00 committed by GitHub
commit 97d9e3ea01
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -108,7 +108,7 @@ if ($bucket->head_key("$releasePrefix")) {
if (! -e $dstFile) { if (! -e $dstFile) {
print STDERR "downloading $srcFile to $dstFile...\n"; print STDERR "downloading $srcFile to $dstFile...\n";
write_file("$dstFile.sha256", $sha256_expected); write_file("$dstFile.sha256", "$sha256_expected $dstName");
system("NIX_REMOTE=https://cache.nixos.org/ nix cat-store '$srcFile' > '$dstFile.tmp'") == 0 system("NIX_REMOTE=https://cache.nixos.org/ nix cat-store '$srcFile' > '$dstFile.tmp'") == 0
or die "unable to fetch $srcFile\n"; or die "unable to fetch $srcFile\n";
rename("$dstFile.tmp", $dstFile) or die; rename("$dstFile.tmp", $dstFile) or die;