build_game.sh: separate vcs fetching from build-loop
This commit is contained in:
parent
2a86794d67
commit
94620ee2da
1 changed files with 12 additions and 3 deletions
|
@ -37,14 +37,16 @@ if [ -f "$SCRPATH"/bin/fteqcc ]; then
|
||||||
|
|
||||||
export OLDDIR=$(pwd)
|
export OLDDIR=$(pwd)
|
||||||
cd ./src
|
cd ./src
|
||||||
make
|
|
||||||
cd "$OLDDIR"
|
|
||||||
|
|
||||||
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
if [ "$BUILD_UPDATE" -eq 1 ]; then
|
||||||
# git pull on the main repo
|
# git pull on the main repo
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
make
|
||||||
|
cd "$OLDDIR"
|
||||||
|
|
||||||
|
# update repos first in case there's dependencies
|
||||||
find "$SCRPATH" -name Makefile | grep 'src\/Makefile' | grep -v engine | grep -v worldspawn | while read MFILE_N; do
|
find "$SCRPATH" -name Makefile | grep 'src\/Makefile' | grep -v engine | grep -v worldspawn | while read MFILE_N; do
|
||||||
NEWDIR=$(dirname "$MFILE_N")
|
NEWDIR=$(dirname "$MFILE_N")
|
||||||
cd "$NEWDIR"
|
cd "$NEWDIR"
|
||||||
|
@ -56,12 +58,19 @@ if [ -f "$SCRPATH"/bin/fteqcc ]; then
|
||||||
set -e
|
set -e
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
cd $OLDDIR
|
||||||
|
done;
|
||||||
|
|
||||||
|
# now loop through _again_ to build
|
||||||
|
find "$SCRPATH" -name Makefile | grep 'src\/Makefile' | grep -v engine | grep -v worldspawn | while read MFILE_N; do
|
||||||
|
NEWDIR=$(dirname "$MFILE_N")
|
||||||
|
cd "$NEWDIR"
|
||||||
make
|
make
|
||||||
cd ..
|
cd ..
|
||||||
export GAMEDIR=$(basename $PWD)
|
export GAMEDIR=$(basename $PWD)
|
||||||
cd $OLDDIR
|
cd $OLDDIR
|
||||||
if [ -f "$SCRPATH"/bin/worldspawn ]; then
|
if [ -f "$SCRPATH"/bin/worldspawn ]; then
|
||||||
./make_mapdef.sh $GAMEDIR
|
./make_mapdef.sh $GAMEDIR
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue