krebs.build: use $F5 to prefix verbose commands
This commit is contained in:
parent
7f1abe50ce
commit
8c264139b2
2
Makefile
2
Makefile
|
@ -51,7 +51,7 @@ evaluate = \
|
|||
execute = \
|
||||
result=$$($(call evaluate,-A config.krebs.build.$(1) --json)) && \
|
||||
script=$$(echo "$$result" | jq -r .) && \
|
||||
echo "$$script" | sh
|
||||
echo "$$script" | PS5=% sh
|
||||
|
||||
# usage: make deploy system=foo [target_host=bar]
|
||||
deploy: ssh ?= ssh
|
||||
|
|
|
@ -42,12 +42,13 @@ let
|
|||
set -eu
|
||||
|
||||
verbose() {
|
||||
printf '+%s\n' "$(printf ' %q' "$@")" >&2
|
||||
printf '%s%s\n' "$PS5$(printf ' %q' "$@")" >&2
|
||||
"$@"
|
||||
}
|
||||
|
||||
echo ${shell.escape git-script} \
|
||||
| ssh -p ${shell.escape target-port} \
|
||||
{ printf 'PS5=%q%q\n' @ "$PS5"
|
||||
echo ${shell.escape git-script}
|
||||
} | verbose ssh -p ${shell.escape target-port} \
|
||||
${shell.escape "${target-user}@${target-host}"} -T
|
||||
|
||||
unset tmpdir
|
||||
|
@ -86,7 +87,7 @@ let
|
|||
set -efu
|
||||
|
||||
verbose() {
|
||||
printf '+%s\n' "$(printf ' %q' "$@")" >&2
|
||||
printf '%s%s\n' "$PS5$(printf ' %q' "$@")" >&2
|
||||
"$@"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue