summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorRyota MIBU <r-mibu@cq.jp.nec.com>2016-02-19 18:02:21 +0900
committerTim Rozet <trozet@redhat.com>2016-02-24 15:17:59 +0000
commit034166ea6f9330310789407d8a124812042f305d (patch)
tree4459fa72831b467458948a140eb6198d9a860d87 /ci
parent5fece9e6f4bca1f7551dfbf50c385300f264f4f4 (diff)
fix bug in ci/build.sh
This patch fixes bug in ci/build.sh that cause the following error message: /bin/opnfv-deploy: line 197: [: too many arguments Change-Id: I92419473262a51806baee849669af9b84b94045c Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
Diffstat (limited to 'ci')
-rwxr-xr-xci/deploy.sh51
1 files changed, 24 insertions, 27 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index 1b8f36f0..31cd4625 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -194,41 +194,38 @@ for Auto-detection${reset}"
done
echo -e "${blue}INFO: Detecting Network Specific settings for: ${enabled_network}${reset}"
# detect network specific settings
- if [ -n $(eval echo \${${enabled_network}_optional_settings}) ]; then
- eval "network_specific_settings=\${${enabled_network}_optional_settings}"
- for setting in ${network_specific_settings}; do
- eval "setting_value=\${${enabled_network}_${setting}}"
- if [ -z "${setting_value}" ]; then
- if [ -n "$nic_value" ]; then
- setting_value=$(eval find_${setting} ${nic_value})
+ for setting in $(eval echo \${${enabled_network}_optional_settings}); do
+ eval "setting_value=\${${enabled_network}_${setting}}"
+ if [ -z "${setting_value}" ]; then
+ if [ -n "$nic_value" ]; then
+ setting_value=$(eval find_${setting} ${nic_value})
+ else
+ setting_value=''
+ echo -e "${blue}INFO: Skipping Auto-detection, NIC not specified for ${enabled_network}. Attempting Auto-generation...${reset}"
+ fi
+ if [ -n "$setting_value" ]; then
+ eval "${enabled_network}_${setting}=${setting_value}"
+ echo -e "${blue}INFO: Auto-detection: ${enabled_network}_${setting}: ${setting_value}${reset}"
+ else
+ eval "cidr=\${${enabled_network}_cidr}"
+ if [ -n "$cidr" ]; then
+ setting_value=$(eval generate_${setting} ${cidr})
else
setting_value=''
- echo -e "${blue}INFO: Skipping Auto-detection, NIC not specified for ${enabled_network}. Attempting Auto-generation...${reset}"
+ echo -e "${red}ERROR: Auto-generation failed: required parameter CIDR missing for network ${enabled_network}${reset}"
fi
if [ -n "$setting_value" ]; then
eval "${enabled_network}_${setting}=${setting_value}"
- echo -e "${blue}INFO: Auto-detection: ${enabled_network}_${setting}: ${setting_value}${reset}"
+ echo -e "${blue}INFO: Auto-generated: ${enabled_network}_${setting}: ${setting_value}${reset}"
else
- eval "cidr=\${${enabled_network}_cidr}"
- if [ -n "$cidr" ]; then
- setting_value=$(eval generate_${setting} ${cidr})
- else
- setting_value=''
- echo -e "${red}ERROR: Auto-generation failed: required parameter CIDR missing for network ${enabled_network}${reset}"
- fi
- if [ -n "$setting_value" ]; then
- eval "${enabled_network}_${setting}=${setting_value}"
- echo -e "${blue}INFO: Auto-generated: ${enabled_network}_${setting}: ${setting_value}${reset}"
- else
- echo -e "${red}ERROR: Auto-generation failed: ${setting} not found${reset}"
- exit 1
- fi
+ echo -e "${red}ERROR: Auto-generation failed: ${setting} not found${reset}"
+ exit 1
fi
- else
- echo -e "${blue}INFO: ${enabled_network}_${setting}: ${setting_value}${reset}"
fi
- done
- fi
+ else
+ echo -e "${blue}INFO: ${enabled_network}_${setting}: ${setting_value}${reset}"
+ fi
+ done
done
}
##parses deploy settings yaml into globals and options array