Add quotes to parameter values if needed
This commit is contained in:
parent
811a39a924
commit
f2e0d41b1f
|
@ -110,7 +110,12 @@ function read_config_param {
|
|||
if [ $CONFIGURATION_FILE ]; then
|
||||
if [ -f $CONFIGURATION_FILE ]; then
|
||||
if grep -q "${param_name}=" $CONFIGURATION_FILE; then
|
||||
export ${param_name}=$(cat $CONFIGURATION_FILE | grep "${param_name}=" | head -n 1 | awk -F '=' '{print $2}')
|
||||
param_value=$(cat $CONFIGURATION_FILE | grep "${param_name}=" | head -n 1 | awk -F '=' '{print $2}')
|
||||
if [[ "${param_value}" != *" "* ]]; then
|
||||
export ${param_name}=${param_value}
|
||||
else
|
||||
export ${param_name}="${param_value}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue