copy-from-other-stores: Use cp

This commit is contained in:
Eelco Dolstra 2015-06-04 14:55:40 +02:00
parent 07d7e7df84
commit b190f771e7

View file

@ -94,7 +94,7 @@ elsif ($ARGV[0] eq "--substitute") {
my ($store, $sourcePath) = findStorePath $storePath;
die unless $store;
print STDERR "\n*** Copying $storePath from $sourcePath\n\n";
system("$binDir/nix-store --dump $sourcePath | $binDir/nix-store --restore $destPath") == 0
system("@coreutils@/cp", "-rpd", $sourcePath, $destPath) == 0
or die "cannot copy $sourcePath to $storePath";
print "\n"; # no hash to verify
}