build.cfg: Add BUILD_UPDATE, which will control whether or not to run a vcs update command before building a project
This commit is contained in:
parent
e50cf421e6
commit
4bebda7940
5 changed files with 36 additions and 9 deletions
|
@ -27,3 +27,6 @@ BUILD_IMGTOOL=1
|
|||
|
||||
# Specify which engine revision to build, these are considered 'stable'
|
||||
BUILD_ENGINEREVISION=5997
|
||||
|
||||
# Whether or not to run 'git pull' or 'svn up' before building a component
|
||||
BUILD_UPDATE=1
|
||||
|
|
|
@ -45,9 +45,13 @@ fi
|
|||
mkdir -p ./bin
|
||||
|
||||
if [ -f "$WS_MAKEFILE" ]; then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
printf "WorldSpawn is present, updating...\n"
|
||||
cd ./src/worldspawn/
|
||||
git pull
|
||||
else
|
||||
cd ./src/worldspawn/
|
||||
fi
|
||||
else
|
||||
printf "WorldSpawn is NOT present, cloning...\n"
|
||||
cd ./src/
|
||||
|
|
|
@ -59,10 +59,14 @@ fi
|
|||
mkdir -p ./bin
|
||||
|
||||
if [ -f "$FTE_MAKEFILE" ]; then
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
printf "Engine is present, updating...\n"
|
||||
cd ./src/engine/
|
||||
svn -r $BUILD_ENGINEREVISION up
|
||||
cd ./engine
|
||||
else
|
||||
cd ./src/engine/engine
|
||||
fi
|
||||
else
|
||||
printf "Engine is NOT present, cloning...\n"
|
||||
cd ./src/
|
||||
|
|
|
@ -4,12 +4,17 @@ set -e
|
|||
SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
|
||||
PATH="$SCRPATH"/bin:"$PATH"
|
||||
|
||||
|
||||
if [ -f "$SCRPATH"/bin/fteqcc ]; then
|
||||
|
||||
# We want to compile a specific game
|
||||
if [ $# -gt 0 ]; then
|
||||
cd "$SCRPATH/$1"/src
|
||||
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
# git pull on the main repo
|
||||
git pull
|
||||
fi
|
||||
|
||||
make
|
||||
cd "$SCRPATH"
|
||||
./make_mapdef.sh "$1"
|
||||
|
@ -21,8 +26,14 @@ if [ -f "$SCRPATH"/bin/fteqcc ]; then
|
|||
make
|
||||
cd "$OLDDIR"
|
||||
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
# git pull on the main repo
|
||||
git pull
|
||||
fi
|
||||
|
||||
find "$SCRPATH" -name Makefile | grep 'src\/Makefile' | grep -v engine | grep -v worldspawn | while read MFILE_N; do
|
||||
cd $(dirname $MFILE_N)
|
||||
git pull
|
||||
make
|
||||
cd ..
|
||||
export GAMEDIR=$(basename $PWD)
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/sh
|
||||
. ./build.cfg
|
||||
set -e
|
||||
SCRPATH="$( cd "$( dirname $(readlink -nf $0) )" && pwd )"
|
||||
|
||||
|
@ -6,7 +7,10 @@ grab_mod()
|
|||
{
|
||||
if [ -f "$SCRPATH/$1"/LICENSE ]; then
|
||||
cd "$SCRPATH/$1"
|
||||
|
||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||
git pull
|
||||
fi
|
||||
else
|
||||
cd "$SCRPATH"
|
||||
git clone "$2" "$1"
|
||||
|
@ -23,3 +27,4 @@ grab_mod scihunt https://www.github.com/eukara/freesci
|
|||
grab_mod hunger https://www.github.com/eukara/freehunger
|
||||
grab_mod valve https://www.github.com/eukara/freehl
|
||||
grab_mod cstrike https://www.github.com/eukara/freecs
|
||||
grab_mod ts https://www.github.com/Frag-Net/FreeTS
|
||||
|
|
Loading…
Reference in a new issue