aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-11-18 22:04:40 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-11-18 22:04:40 -0200
commit1d5741c1b3e13a6a47848d4693efeda1a74dd3ab (patch)
treebc869ce2c8d1245752b2505f71b81c9fc1cc9fcb
parent3916fa14045abb292ad1865302296c31ff89dc06 (diff)
downloadkvmx-1d5741c1b3e13a6a47848d4693efeda1a74dd3ab.tar.gz
kvmx-1d5741c1b3e13a6a47848d4693efeda1a74dd3ab.tar.bz2
Provision: go inside the project folder so a relative $ORIG works
-rwxr-xr-xkvmx4
1 files changed, 4 insertions, 0 deletions
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