mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-20 23:30:42 +00:00
Added xonotic_export.sh utility that when run from a xonotic-data.pk3dir will eliminate redundant files and create prog.src files for csprogs, progs(server) and menu. This tool will be used for check-proj.sh for exporting xonotic changes to our server.
This commit is contained in:
parent
6a235dc25f
commit
5bb245a33a
1 changed files with 55 additions and 0 deletions
55
misc/xonotic_export.sh
Executable file
55
misc/xonotic_export.sh
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ ! -d qcsrc ]; then
|
||||
echo "failed to find qcsrc directory in $(pwd), please run this script"
|
||||
echo "from xonotic-data.pk3dir"
|
||||
exit 1
|
||||
else
|
||||
# ensure this is actually a xonotic repo
|
||||
pushd qcsrc > /dev/null
|
||||
if [ ! -d client -o ! -d common -o ! -d dpdefs -o ! -d menu -o ! -d server -o ! -d warpzonelib ]; then
|
||||
echo "this doesnt look like a xonotic source tree, aborting"
|
||||
popd >> /dev/null
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# force reset and update
|
||||
git rev-parse
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "not a git directory, continuing without rebase"
|
||||
else
|
||||
echo -n "resetting git state and updating ... "
|
||||
git reset --hard HEAD > /dev/null
|
||||
git pull > /dev/null
|
||||
echo "complete"
|
||||
fi
|
||||
|
||||
echo -n "removing redundant files ... "
|
||||
# remove redundant stuff
|
||||
rm -f autocvarize.pl
|
||||
rm -f autocvarize-update.sh
|
||||
rm -f collect-precache.sh
|
||||
rm -f fteqcc-bugs.qc
|
||||
rm -f i18n-badwords.txt
|
||||
rm -f i18n-guide.txt
|
||||
rm -rf server-testcase
|
||||
rm -f Makefile
|
||||
rm -f *.src
|
||||
echo "complete"
|
||||
|
||||
echo -n "creating prog.src files ... "
|
||||
find client common warpzonelib csqcmodellib -type f > csprogs.src
|
||||
ls server/w_*.qc | cat >> csprogs.src
|
||||
find server common warpzonelib csqcmodellib -type f > progs.src
|
||||
ls server/w_*.qc | cat >> progs.src
|
||||
find menu common warpzonelib -type f > menu.src
|
||||
ls server/w_*.qc | cat >> menu.src
|
||||
echo "complete"
|
||||
|
||||
echo -n "creating zip archive ... "
|
||||
zip -r ../xonotic.zip * > /dev/null
|
||||
echo "complete"
|
||||
|
||||
popd > /dev/null
|
||||
echo "finished!"
|
Loading…
Reference in a new issue