amogusspecialsauce/build.sh

33 lines
903 B
Bash
Raw Normal View History

2023-08-20 16:28:06 +00:00
#!/bin/bash
2023-08-19 22:57:04 +00:00
base=xonotic-data.pk3dir
2023-08-19 21:01:22 +00:00
2023-08-20 14:02:21 +00:00
# Apply specialsauce
cp -R xonoticspecialsauce/* xonotic-data.pk3dir
2023-08-19 21:01:22 +00:00
: ${PROGS_OUT:=$PWD}
export PROGS_OUT
stamp=$(date +"%s")
: ${QCC:=$PWD/gmqcc/gmqcc}
export QCC
export QCCFLAGS_WATERMARK="xonotic-$stamp"
export XONOTIC=1
make -C ${base}
2023-08-19 22:42:06 +00:00
echo "Compiled successfully!";
2023-08-19 21:01:22 +00:00
mkdir -vp $(dirname "$0")/compiled
2023-08-19 22:57:04 +00:00
mv -v *.dat $(dirname "$0")/compiled
rm *.lno
2023-08-20 14:06:52 +00:00
mkdir dist
2023-08-20 16:28:06 +00:00
if [[ -n "${DRONE_TAG}" ]]
then
echo "Making ready for Tag: $DRONE_TAG"
zip -9 dist/compiled-$DRONE_TAG.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
elif [[ -n "${DRONE_COMMIT_SHA}" ]]
then
COMMIT_SHA = ${DRONE_COMMIT_SHA:0:10}
echo "Making ready for Commit: $COMMIT_SHA"
zip -9 dist/compiled-$COMMIT_SHA.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
2023-08-20 14:02:21 +00:00
else
2023-08-20 16:28:06 +00:00
zip -9 dist/compiled.zip compiled/csprogs.dat compiled/progs.dat compiled/menu.dat
2023-08-20 14:02:21 +00:00
fi