summaryrefslogtreecommitdiffstats
path: root/ci/deploy.sh
diff options
context:
space:
mode:
authorFeng Pan <fpan@redhat.com>2016-05-26 20:23:24 -0400
committerFeng Pan <fpan@redhat.com>2016-06-02 21:09:57 +0000
commiteafd7cfc494b81e478ad32ce235fbd3c25523769 (patch)
tree4baf90d88e586f99cf15e70944e148e645637a0a /ci/deploy.sh
parentae28031af48b31d909eaa9ea2290f578309e4000 (diff)
Add library sourcing error check
Change-Id: Ief7fd339fa2ca8661c8e157270aa9b0339d3b637 Signed-off-by: Feng Pan <fpan@redhat.com>
Diffstat (limited to 'ci/deploy.sh')
-rwxr-xr-xci/deploy.sh14
1 files changed, 11 insertions, 3 deletions
diff --git a/ci/deploy.sh b/ci/deploy.sh
index bb4c1f81..97ab0e55 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