2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-10 23:30:11 +00:00

add the COMMITID flag to buildcore.sh

This commit is contained in:
ligc
2015-07-03 02:11:02 -04:00
parent 69f0384194
commit e4fa6bf124

View File

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