build-support: make factor.sh check the git branch.

db4
John Benediktsson 2012-07-11 12:08:29 -07:00
parent a1a123c0c6
commit f019ee8776
1 changed files with 9 additions and 0 deletions

View File

@ -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
}