From 4c5e6d1a2f48a26c22ee5b515f8ac672d3d2e7ab Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 22 Feb 2007 15:48:20 +0000 Subject: [PATCH] * nix-copy-closure: option --sign. * nix-copy-closure: set SSH options through NIX_SSHOPTS.. --- scripts/nix-copy-closure.in | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/scripts/nix-copy-closure.in b/scripts/nix-copy-closure.in index ec2df8828..80a6a8051 100644 --- a/scripts/nix-copy-closure.in +++ b/scripts/nix-copy-closure.in @@ -4,8 +4,20 @@ my $binDir = $ENV{"NIX_BIN_DIR"}; $binDir = "@bindir@" unless defined $binDir; +if (scalar @ARGV < 1) { + print STDERR <) { chomp; @@ -50,6 +66,8 @@ close READ or die; # Export the store paths and import them on the remote machine. if (scalar @missing > 0) { - system("nix-store --export @missing | ssh $sshHost nix-store --import") == 0 + my $extraOpts = ""; + $extraOpts .= "--sign" if $sign == 1; + system("nix-store --export $extraOpts @missing | ssh @sshOpts $sshHost nix-store --import") == 0 or die "copying store paths to remote machine failed: $?"; }