summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-06-03 17:24:02 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-06-03 17:24:02 +0000
commit0487c382acb6373d26180eb954559c406d5ad528 (patch)
tree8f951a3ff41c76e86314ba6c9c930d803d39f4bb
parentb437e54b11a3cd6c1bbfa4b54534321453404516 (diff)
parenteafd7cfc494b81e478ad32ce235fbd3c25523769 (diff)
Merge "Add library sourcing error check"
-rwxr-xr-xci/clean.sh5
-rwxr-xr-xci/deploy.sh14
2 files changed, 15 insertions, 4 deletions
diff --git a/ci/clean.sh b/ci/clean.sh
index ac958f6a..b898fc9c 100755
--- a/ci/clean.sh
+++ b/ci/clean.sh
@@ -18,7 +18,10 @@ RESOURCES=${RESOURCES:-"$CONFIG/images"}
LIB=${LIB:-"$CONFIG/lib"}
##LIBRARIES
-source $LIB/common-functions.sh
+if ! source $LIB/common-functions.sh; then
+ echo "Failed to source $LIB/common-functions.sh"
+ exit 1
+fi
vm_index=4
ovs_bridges="br-admin br-private br-public br-storage"
diff --git a/ci/deploy.sh b/ci/deploy.sh
index a40b92a2..af6b7779 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -55,9 +55,17 @@ ext_net_type="interface"
ip_address_family=4
# Libraries
-source $LIB/common-functions.sh
-source $LIB/utility-functions.sh
-source $LIB/installer/onos/onos_gw_mac_update.sh
+lib_files=(
+$LIB/common-functions.sh
+$LIB/utility-functions.sh
+$LIB/installer/onos/onos_gw_mac_update.sh
+)
+for lib_file in ${lib_files[@]}; do
+ if ! source $lib_file; then
+ echo -e "${red}ERROR: Failed to source $lib_file${reset}"
+ exit 1
+ fi
+done
##FUNCTIONS
##translates yaml into variables