Code Select
#!/bin/bash -x
OUTPUT_DIR=/home/linus/www/tesseract-daily/
cd sauerbraten
[ $(svn up | wc -l) != 1 ] && resauer=1
cd ..
cd tesseract
[ "$(git pull origin master | tail -n 1)" = "Already up-to-date." ] || retess=1
[ -z "$retess$resauer" ] && ( echo "No action necessary." ; exit 0 )
rm -f $OUTPUT_DIR/tesseract*-daily-*
OUTPUT_PREFIX=`date +%Y-%m-%d`-`git rev-parse --short HEAD`
cd ../tesseract
if [ -n "$retess" ] ; then
(cd src && make clean clean-enet && make -s CXX=i586-mingw32msvc-g++ STRIP=i586-mingw32msvc-strip WINDRES=i586-mingw32msvc-windres LD=i586-mingw32msvc-ld PLATFORM=MINGW install)
fi
7z a -mmt0 -l -xr!?git/* -x!sauerbraten -x!server-init.cfg -x!src $OUTPUT_DIR/tesseract-daily-win32-${OUTPUT_PREFIX}.7z *
cp $OUTPUT_DIR/tesseract-daily-win32-${OUTPUT_PREFIX}.7z /tmp/withdata.7z
cd ../sauerbraten/
7z a -mmt0 -l -xr!?git/* -xr!?svn/* -x!server-init.cfg /tmp/withdata.7z packages
cp /tmp/withdata.7z $OUTPUT_DIR/tesseract-with-data-daily-win32-${OUTPUT_PREFIX}.7z
rm /tmp/withdata.7z
Mission complete! Yay for hacky code... To be expected I guess, it's bash after all.