about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-08-25T12·19+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-08-25T12·19+0000
commit1a396f3789feefc20bdcd8a355939eb1ec5126c2 (patch)
tree4dc3095c4236d3ea9372930ec9b8c45ebbc91e3d
parent95deba581dc3a93874b13406fb5c4dfb6747bbc3 (diff)
* Don't call "cat".
-rwxr-xr-xscripts/build-remote.pl.in11
1 files changed, 4 insertions, 7 deletions
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in
index 2fb29dcfc894..9b3d98cd564b 100755
--- a/scripts/build-remote.pl.in
+++ b/scripts/build-remote.pl.in
@@ -194,11 +194,8 @@ if ($x ne "okay") {
 
 print STDERR "building `$drvPath' on `$hostName'\n";
 
-my $inputs = `cat inputs`; die if ($? != 0);
-$inputs =~ s/\n/ /g;
-
-my $outputs = `cat outputs`; die if ($? != 0);
-$outputs =~ s/\n/ /g;
+my @inputs = split /\s/, do { local $/; local @ARGV = "inputs"; <> };
+my @outputs = split /\s/, do { local $/; local @ARGV = "outputs"; <> };
 
 my $maybeSign = "";
 $maybeSign = "--sign" if -e "/nix/etc/nix/signing-key.sec";
@@ -217,7 +214,7 @@ sub removeRoots {
 
 
 # Copy the derivation and its dependencies to the build machine.
-system("NIX_SSHOPTS=\"@sshOpts\" @bindir@/nix-copy-closure $hostName $maybeSign $drvPath $inputs") == 0
+system("NIX_SSHOPTS=\"@sshOpts\" @bindir@/nix-copy-closure $hostName $maybeSign $drvPath @inputs") == 0
     or die "cannot copy inputs to $hostName: $?";
 
 
@@ -245,7 +242,7 @@ print "build of `$drvPath' on `$hostName' succeeded\n";
 
 
 # Copy the output from the build machine.
-foreach my $output (split '\n', $outputs) {
+foreach my $output (@outputs) {
     my $maybeSignRemote = "";
     $maybeSignRemote = "--sign" if $UID != 0;