mirror of
https://github.com/lloeki/apply.git
synced 2025-12-06 09:24:38 +01:00
Locate units using APPLY_ROOT env var
This commit is contained in:
parent
8a178cdc2b
commit
44eeefea79
4 changed files with 21 additions and 5 deletions
6
push
6
push
|
|
@ -8,6 +8,10 @@ function usage() {
|
|||
exit 1
|
||||
}
|
||||
|
||||
if [[ -z "${APPLY_ROOT:-}" ]]; then
|
||||
APPLY_ROOT="."
|
||||
fi
|
||||
|
||||
if [[ $# -lt 1 ]]; then
|
||||
usage
|
||||
fi
|
||||
|
|
@ -33,7 +37,7 @@ remote="$1"
|
|||
|
||||
tmp=$(ssh "$remote" 'mktemp -d')
|
||||
echo -e -n "\033[33m** pushing to\033[0m $remote:$tmp"
|
||||
if scp -q -r groups units run lib "$remote":"$tmp"; then
|
||||
if scp -q -r "${APPLY_ROOT}"/{groups,units,run,lib} "$remote":"$tmp"; then
|
||||
echo -e " \033[32mOK\033[0m"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue