summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-07-03 22:24:41 +0100
committerMarkos Chandras <mchandras@suse.de>2017-07-03 22:27:19 +0100
commit68412ffc734e9e34b0e4b9209bdd7b4222b2003d (patch)
tree1ad03b777cd5a69386983a7e632a154c93b07c4a
parentc25fa35e198bb190312a1cf84569c3ebdd78b0a8 (diff)
prototypes: xci: xci-deploy.sh: Append trailing slash for rsync vars
The 'synchronize' Ansible module uses rsync and for that we need to indicate that we want to copy the contents of the development path and not the development path itself. As such we need to ensure that a trailing slash is always appended to the user variables but we need to also ensure that we will not end up with double slashes. Change-Id: I0103b754585931fa1dcd3966c52d7e4a8f2f63f6 Signed-off-by: Markos Chandras <mchandras@suse.de>
-rwxr-xr-xprototypes/xci/xci-deploy.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/prototypes/xci/xci-deploy.sh b/prototypes/xci/xci-deploy.sh
index 3a65983ac..a72c9274a 100755
--- a/prototypes/xci/xci-deploy.sh
+++ b/prototypes/xci/xci-deploy.sh
@@ -38,6 +38,15 @@ source "$XCI_PATH/config/${XCI_FLAVOR}-vars"
source $XCI_PATH/config/env-vars
#-------------------------------------------------------------------------------
+# Sanitize local development environment variables
+#-------------------------------------------------------------------------------
+user_local_dev_vars=(OPNFV_RELENG_DEV_PATH OPNFV_OSA_DEV_PATH OPNFV_BIFROST_DEV_PATH)
+for local_user_var in ${user_local_dev_vars[@]}; do
+ [[ -n ${!local_user_var} ]] && export $local_user_var=${!local_user_var%/}/
+done
+unset user_local_dev_vars local_user_var
+
+#-------------------------------------------------------------------------------
# Log info to console
#-------------------------------------------------------------------------------
echo "Info: Starting XCI Deployment"