krebs.build.populate: allow overriding ssh

This commit is contained in:
tv 2016-02-19 18:54:20 +01:00
parent 8f6892ef5b
commit a607671662

View File

@ -41,6 +41,8 @@ let
#! /bin/sh #! /bin/sh
set -eu set -eu
ssh=''${ssh-ssh}
verbose() { verbose() {
printf '%s%s\n' "$PS5$(printf ' %q' "$@")" >&2 printf '%s%s\n' "$PS5$(printf ' %q' "$@")" >&2
"$@" "$@"
@ -48,7 +50,7 @@ let
{ printf 'PS5=%q%q\n' @ "$PS5" { printf 'PS5=%q%q\n' @ "$PS5"
echo ${shell.escape git-script} echo ${shell.escape git-script}
} | verbose ssh -p ${shell.escape target-port} \ } | verbose $ssh -p ${shell.escape target-port} \
${shell.escape "${target-user}@${target-host}"} -T ${shell.escape "${target-user}@${target-host}"} -T
unset tmpdir unset tmpdir
@ -77,7 +79,7 @@ let
) (attrNames source-by-method.file)} \ ) (attrNames source-by-method.file)} \
--delete \ --delete \
-vFrlptD \ -vFrlptD \
-e ${shell.escape "ssh -p ${target-port}"} \ -e "$ssh -p ${shell.escape target-port}" \
${shell.escape target-path}/ \ ${shell.escape target-path}/ \
${shell.escape "${target-user}@${target-host}:${target-path}"} ${shell.escape "${target-user}@${target-host}:${target-path}"}
''; '';