summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTushar Gohad <tushar.gohad@intel.com>2014-05-01 22:47:28 -0700
committerTushar Gohad <tushar.gohad@intel.com>2014-05-01 23:02:12 -0700
commit0c144dd580d5ce430639caddbe830ce9ef3498e3 (patch)
tree96a5f04adf67dca964c381fd6ae2bfabde35bb21
parent858fa1b13fb4509c51d9d425436a993a19127a97 (diff)
downloadpyeclib-0c144dd580d5ce430639caddbe830ce9ef3498e3.tar.gz
build: Error out if dep download failed
Signed-off-by: Tushar Gohad <tushar.gohad@intel.com>
-rwxr-xr-xc_eclib-0.9/build-c_eclib.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/c_eclib-0.9/build-c_eclib.sh b/c_eclib-0.9/build-c_eclib.sh
index 5e3dea4..2ac8e59 100755
--- a/c_eclib-0.9/build-c_eclib.sh
+++ b/c_eclib-0.9/build-c_eclib.sh
@@ -2,6 +2,14 @@
# These directory stack functions are based upon the versions in the Korn
# Shell documentation - http://docstore.mik.ua/orelly/unix3/korn/ch04_07.htm.
+
+exit_if_error() {
+ if [ $? -ne 0 ]; then
+ echo "ERROR in $0"
+ exit
+ fi
+}
+
dirs() {
echo "$_DIRSTACK"
}
@@ -37,6 +45,7 @@ download() {
else
${CURL_PROG} -O ${pkgurl}
fi
+ exit_if_error
}
realpath() {