71 lines
1.2 KiB
Bash
Executable File
71 lines
1.2 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
MAKEVER=$(make --version | awk '{ print $1 }' | head -n 1)
|
|
|
|
# is this GNU?
|
|
if [ "$MAKEVER" = "GNU" ]
|
|
then
|
|
MAKETOOL="make"
|
|
else
|
|
# guess not, do we have gmake?
|
|
if [ -x "$(command -v gmake)" ]
|
|
then
|
|
MAKEVER=$(gmake --version | awk '{ print $1 }' | head -n 1)
|
|
if [ "$MAKEVER" = "GNU" ]
|
|
then
|
|
MAKETOOL="gmake"
|
|
else
|
|
echo "Please install GNU Make."
|
|
exit 2
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
DEPSDIR="$(pwd)/_deps"
|
|
BINDIR="$(pwd)/_bin"
|
|
INCTOOLDIR="$(pwd)/tools"
|
|
|
|
if [ -d "$DEPSDIR" ]
|
|
then
|
|
rm -rf "$DEPSDIR"
|
|
fi
|
|
|
|
if [ -d "$BINDIR" ]
|
|
then
|
|
rm -rf "$BINDIR"
|
|
fi
|
|
|
|
mkdir "$DEPSDIR"
|
|
mkdir "$BINDIR"
|
|
cd "$DEPSDIR"
|
|
|
|
git clone https://vcs.vera-visions.com/eukara/REWise
|
|
cd REWise
|
|
$MAKETOOL CC=cc
|
|
mv -v rewise "$BINDIR/rewise"
|
|
|
|
cd "$DEPSDIR"
|
|
git clone https://vcs.vera-visions.com/eukara/HLLib
|
|
cd HLLib/HLLib
|
|
$MAKETOOL CC=cc CXX=c++
|
|
cd ../HLExtract
|
|
$MAKETOOL CC=cc CXX=c++
|
|
mv -v hlextract "$BINDIR/hlextract"
|
|
|
|
cd "$DEPSDIR"
|
|
git clone https://github.com/yquake2/pakextract
|
|
cd pakextract
|
|
$MAKETOOL CC=cc
|
|
mv -v pakextract "$BINDIR/pakextract"
|
|
|
|
cd "$INCTOOLDIR/bmpfix"
|
|
cc -o bmpfix bmpfix.c
|
|
mv -v bmpfix "$BINDIR/bmpfix"
|
|
|
|
cd "$INCTOOLDIR/gpl-quake"
|
|
cc -o qfiles cmdlib.c qfiles.c
|
|
mv -v qfiles "$BINDIR/qfiles"
|
|
|