From bf23243d129b25322503e2a56d57fc90195da79f Mon Sep 17 00:00:00 2001 From: Rob Vermaas Date: Tue, 19 Oct 2010 11:39:24 +0000 Subject: [PATCH] mirror-channel.pl: check if file is a bzip2 file git-svn-id: https://nixos.org/repos/nix/release/trunk/channels@24362 70bd8c7a-acb8-0310-9f0d-9cc1c95dcdbb --- mirror-channel.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/mirror-channel.pl b/mirror-channel.pl index db3d56d..76d6b35 100644 --- a/mirror-channel.pl +++ b/mirror-channel.pl @@ -80,6 +80,7 @@ while (my ($storePath, $files) = each %narFiles) { print "downloading $srcURL\n"; my $dstFileTmp = "$narPath/.tmp.$$.nar.$dstName"; system("$curl '$srcURL' > $dstFileTmp") == 0 or die "failed to download `$srcURL'"; + system("bunzip2 -t $dstFileTmp &> /dev/null") == 0 or die "downloaded file is not a bzip2 file!"; rename($dstFileTmp, $dstFile) or die "cannot rename $dstFileTmp"; }