diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-05-23T18·39-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2013-05-23T18·39-0400 |
commit | 107505e13ac83850fe01ef3e1a35e5bb2ab1ef52 (patch) | |
tree | b6ad64d9080f43747c4bdfe9ca71117eb054718b /scripts/build-remote.pl.in | |
parent | 72d8209548f2ba16e41a2faa850ab9af3616453d (diff) |
build-remote.pl: Copy all outputs in one operation
Diffstat (limited to 'scripts/build-remote.pl.in')
-rwxr-xr-x | scripts/build-remote.pl.in | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/build-remote.pl.in b/scripts/build-remote.pl.in index dd56b600c75d..c8e73cebb4ad 100755 --- a/scripts/build-remote.pl.in +++ b/scripts/build-remote.pl.in @@ -289,13 +289,13 @@ if (system("exec ssh $hostName @sshOpts '(read; kill -INT -\$\$) <&0 & exec nix- # Copy the output from the build machine. -foreach my $output (@outputs) { +my @outputs2 = grep { !isValidPath($_) } @outputs; +if (scalar @outputs2 > 0) { my $maybeSignRemote = ""; $maybeSignRemote = "--sign" if $UID != 0; - next if isValidPath($output); - system("exec ssh $hostName @sshOpts 'nix-store --export $maybeSignRemote $output'" . - "| NIX_HELD_LOCKS=$output @bindir@/nix-store --import > /dev/null") == 0 - or die "cannot copy $output from $hostName: $?"; + system("exec ssh $hostName @sshOpts 'nix-store --export $maybeSignRemote @outputs2'" . + "| NIX_HELD_LOCKS='@outputs2' @bindir@/nix-store --import > /dev/null") == 0 + or die("cannot copy paths " . join(", ", @outputs) . " from `$hostName': $?"); } |