From d3affbf2236e8127ea904e51c3b54a089168499c 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 --- xci/xci-deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index a72c9274..d7112565 100755 --- a/xci/xci-deploy.sh +++ b/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 1.2.3-korg