aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rwxr-xr-xbuild12
1 files changed, 12 insertions, 0 deletions
diff --git a/build b/build
index 58e24c7e624..34a34ed6a11 100755
--- a/build
+++ b/build
@@ -64,6 +64,18 @@ if [ -z "$PRODUCT" ] ; then
fi
#
+# check that we are in a valid branch
+#
+
+if git-branch | head -n1 | grep -q "* (no branch)"; then
+ cat <<EOF 1>&2
+There is no branch in the local copy of the repository right now!
+Hint: type git-branch, make sure you are in a valid branch and then try again
+EOF
+ exit 1
+fi;
+
+#
# get the branch and head hash for the version we are building to
# allow source tracability
#