From c362e4d718cb31e532a4e2d708d07a57bc3bdf55 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Oct 2011 11:45:36 +0000 Subject: * Move SSH.pm. --- scripts/nix-copy-closure.in | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'scripts/nix-copy-closure.in') diff --git a/scripts/nix-copy-closure.in b/scripts/nix-copy-closure.in index c037f003f0d0..966f860d0b51 100755 --- a/scripts/nix-copy-closure.in +++ b/scripts/nix-copy-closure.in @@ -1,8 +1,7 @@ -#! @perl@ -w -I@libexecdir@/nix +#! @perl@ -w @perlFlags@ -use SSH; - -my $binDir = $ENV{"NIX_BIN_DIR"} || "@bindir@"; +use Nix::SSH; +use Nix::Config; if (scalar @ARGV < 1) { @@ -61,7 +60,7 @@ if ($toMode) { # Copy TO the remote machine. my @allStorePaths; # Get the closure of this path. - my $pid = open(READ, "set -f; $binDir/nix-store --query --requisites @storePaths|") or die; + my $pid = open(READ, "set -f; $Nix::Config::binDir/nix-store --query --requisites @storePaths|") or die; while () { chomp; @@ -130,7 +129,7 @@ else { # Copy FROM the remote machine. print STDERR " $_\n" foreach @missing; my $extraOpts = ""; $extraOpts .= "--sign" if $sign == 1; - system("set -f; ssh $sshHost @sshOpts 'nix-store --export $extraOpts @missing $compressor' | $decompressor @bindir@/nix-store --import") == 0 + system("set -f; ssh $sshHost @sshOpts 'nix-store --export $extraOpts @missing $compressor' | $decompressor $Nix::Config::binDir/nix-store --import") == 0 or die "copying store paths from remote machine `$sshHost' failed: $?"; } -- cgit 1.4.1