diff mbox

[Cbuilv2/get_source,01/17] lib/make.sh: Don't continue with build if source isn't found.

Message ID 1382129579-5777-2-git-send-email-ryan.arnold@linaro.org
State New
Headers show

Commit Message

Ryan S. Arnold Oct. 18, 2013, 8:52 p.m. UTC
From: "Ryan S. Arnold" <ryan.arnold@linaro.org>

---
 lib/make.sh | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/lib/make.sh b/lib/make.sh
index 2fd5dd4..814eaf8 100755
--- a/lib/make.sh
+++ b/lib/make.sh
@@ -102,6 +102,10 @@  build()
 
     local file="`echo $1 | sed -e 's:\.tar.*::'`"
     local gitinfo="`get_source $1`"
+    if test -z "${gitinfo}"; then
+	error "No matching source found for \"$1\"."
+	return 1
+    fi
     local url="`echo ${gitinfo} | cut -d ' ' -f 1`"
     if test `echo ${gitinfo} | wc -w` -gt 1; then
 	local branch="/`echo ${gitinfo} | cut -d ' ' -f 2`"