From f019ee877624619f10b88324e970d33e1b401c0c Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 11 Jul 2012 12:08:29 -0700 Subject: [PATCH] build-support: make factor.sh check the git branch. --- build-support/factor.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build-support/factor.sh b/build-support/factor.sh index 28e6b9d0fe..f4148c0d41 100755 --- a/build-support/factor.sh +++ b/build-support/factor.sh @@ -110,6 +110,14 @@ set_make() { MAKE='make' } +check_git_branch() { + BRANCH=`git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,'` + if [ "$BRANCH" != "master" ] ; then + $ECHO "git branch is $BRANCH, not master" + exit_script 3 + fi +} + check_installed_programs() { ensure_program_installed chmod ensure_program_installed uname @@ -501,6 +509,7 @@ get_url() { get_config_info() { find_build_info + check_git_branch check_installed_programs check_libraries }