From: Silvio Rhatto Date: Sun, 19 Nov 2017 00:04:40 +0000 (-0200) Subject: Provision: go inside the project folder so a relative $ORIG works X-Git-Tag: 0.1.0~350 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=1d5741c1b3e13a6a47848d4693efeda1a74dd3ab;p=kvmx.git Provision: go inside the project folder so a relative $ORIG works --- diff --git a/kvmx b/kvmx index 572b3d7..f050219 100755 --- a/kvmx +++ b/kvmx @@ -993,8 +993,12 @@ function kvmx_provision { # Sync custom provisioners if [ "$ORIG" != "$KVMX_BASE/share/provision/" ] && [ "$DEST" != "/usr/local/share/kvmx/provision/" ]; then + ( + # Go inside the project folder so a relative $ORIG works + cd `dirname $KVMXFILE` &> /dev/null echo "sudo mkdir -p `dirname $DEST`" | kvmx_ssh rsync -av -e "$SSH_COMMAND -o Port=$SSH" $provision_rsync_opts --rsync-path "sudo rsync" $ORIG/ 127.0.0.1:$DEST/ + ) fi fi