From 7bb632b02464febd8806ef4bd3fa0ac107f52650 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 10 Jul 2014 20:43:04 +0200 Subject: =?UTF-8?q?nix-copy-closure=20-s:=20Do=20substitutions=20via=20?= =?UTF-8?q?=E2=80=98nix-store=20--serve=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This means we no longer need an SSH master connection, since we only execute a single command on the remote host. --- scripts/nix-copy-closure.in | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'scripts/nix-copy-closure.in') diff --git a/scripts/nix-copy-closure.in b/scripts/nix-copy-closure.in index abd3760fc..05faa6391 100755 --- a/scripts/nix-copy-closure.in +++ b/scripts/nix-copy-closure.in @@ -81,9 +81,6 @@ while (@ARGV) { die "$0: you did not specify a host name\n" unless defined $sshHost; -openSSHConnection $sshHost or die "$0: unable to start SSH\n"; - - if ($toMode) { # Copy TO the remote machine. Nix::CopyClosure::copyTo( $sshHost, [ @sshOpts ], [ @storePaths ], $compressor, $decompressor, @@ -92,6 +89,8 @@ if ($toMode) { # Copy TO the remote machine. else { # Copy FROM the remote machine. + openSSHConnection $sshHost or die "$0: unable to start SSH\n"; + # Query the closure of the given store paths on the remote # machine. Paths are assumed to be store paths; there is no # resolution (following of symlinks). -- cgit v1.2.3