From 81cf0fad48c181a22e65ebda341a8f8ea0c08686 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Wed, 5 Jul 2017 15:06:49 +0100 Subject: prototypes: xci: xci-deploy: Set default value for devel parameters Commit 68412ffc734e ("prototypes: xci: xci-deploy.sh: Append trailing slash for rsync vars") modified xci-deploy.sh script to append a trailing slash to the devel variables but it broke the script when one of these variables was not set (since we run with 'set -eu') with the following error: ./xci-deploy.sh: line 45: !local_user_var: unbound variable Fixes: I0103b754585931fa1dcd3966c52d7e4a8f2f63f6 Change-Id: Ic2465ff07348b61e74e191516425cd10d80c1fce Signed-off-by: Markos Chandras --- prototypes/xci/xci-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'prototypes') diff --git a/prototypes/xci/xci-deploy.sh b/prototypes/xci/xci-deploy.sh index a72c9274a..d71125651 100755 --- a/prototypes/xci/xci-deploy.sh +++ b/prototypes/xci/xci-deploy.sh @@ -42,7 +42,7 @@ source $XCI_PATH/config/env-vars #------------------------------------------------------------------------------- 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%/}/ + [[ -n ${!local_user_var:-} ]] && export $local_user_var=${!local_user_var%/}/ done unset user_local_dev_vars local_user_var -- cgit