From bbf912a18cfeecdd95bb6e56498b6e8099a5d927 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 3 Jul 2017 22:24:41 +0100 Subject: 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 --- xci/xci-deploy.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xci') diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index 3a65983a..a72c9274 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -37,6 +37,15 @@ source "$XCI_PATH/config/${XCI_FLAVOR}-vars" # source xci configuration 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 #------------------------------------------------------------------------------- -- cgit 1.2.3-korg