From e4fa6bf124527e7ea514c3d047e8c36b6d7ee2c4 Mon Sep 17 00:00:00 2001 From: ligc Date: Fri, 3 Jul 2015 02:11:02 -0400 Subject: [PATCH] add the COMMITID flag to buildcore.sh --- buildcore.sh | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/buildcore.sh b/buildcore.sh index 4774ccd46..70180f4bd 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -230,13 +230,23 @@ if [ "$GIT" = "1" ]; then exit 3 fi if [ -z "$GITUP" ]; then - GITUP=../coregitup - echo "git pull > $GITUP" - git pull > $GITUP - if [[ $? != 0 ]]; then - # do not continue so we do not build with old files - echo "The 'git pull' command failed. Exiting the build." - exit 3 + if [ ! -z "$COMMITID" ]; then + echo "git checkout $COMMITID" + git checkout $COMMITID + if [[ $? != 0 ]]; then + # do not continue so we do not build with old files + echo "The 'git checkout' command failed. Exiting the build." + exit 3 + fi + else + GITUP=../coregitup + echo "git pull > $GITUP" + git pull > $GITUP + if [[ $? != 0 ]]; then + # do not continue so we do not build with old files + echo "The 'git pull' command failed. Exiting the build." + exit 3 + fi fi fi if ! $GREP 'Already up-to-date' $GITUP; then