Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Anonymouse

#1
The Mega Archive / Re: New tesseract daily build
December 22, 2012, 12:57:08 PM
 :rockin:

#!/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.
#2
The Mega Archive / Re: New tesseract daily build
November 28, 2012, 08:51:41 PM
Hmmm, I guess... Maybe I'll do that eventually.

Actually, whether svn updated can be determined simply by wc -l... if [ $(svn up | wc -l) != 1 ] ; then flablabupdatethearchive ; done
#3
The Mega Archive / Re: New tesseract daily build
November 26, 2012, 09:23:08 PM
I was going to do that but checking became too ugly for me (as far as I know you'd have to check if $(svn up) begins with "At revision"...
Git would have been less of a pain because it simply always says "Already up-to-date" and I did implement it at first but... whatever :P
#4
Introduce yourself / Re: Oh hello.
November 26, 2012, 09:19:43 PM
Three admins replied to my hello topic! I feel important now!
#5
Introduce yourself / Oh hello.
November 25, 2012, 11:10:22 PM
Hi. I'm Anonymouse (but my real name is Linus, not Torvalds. So much for "anonymous" :P ). I'm a person who is German, lived in England for 13 years, and now lives in France. I like programming. In python, C, C++, and a variety of other languages. And I dunno what else to say. Ask me for anything else!
#6
The Mega Archive / New tesseract daily build
November 25, 2012, 11:05:42 PM
Hi everyone, I've set up another place with daily builds of tesseract.
http://rru-stuff.org/tesseract-daily/

It may well download faster than here from mapping hell (I got 200kbps max from here and some 500 from mine).

I also modified (dare I say improved?) the script for building and archiving it a little.


#!/bin/bash -x

OUTPUT_DIR=/home/linus/www/tesseract-daily/

(cd sauerbraten && svn up)

cd tesseract
git pull origin master

rm -f $OUTPUT_DIR/tesseract*-daily-*
OUTPUT_PREFIX=`date +%Y-%m-%d`-`git rev-parse --short HEAD`

(cd src && make clean clean-enet && make install)
7z a -mmt0 -l -xr!?git/* -x!sauerbraten -x!server-init.cfg -x!src $OUTPUT_DIR/tesseract-daily-${OUTPUT_PREFIX}.7z *
cp $OUTPUT_DIR/tesseract-daily-${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-${OUTPUT_PREFIX}.7z

cd ../tesseract
(cd src && make clean clean-enet && make CXX=i586-mingw32msvc-g++ STRIP=i586-mingw32msvc-strip WINDRES=i586-mingw32msvc-windres LD=i586-mingw32msvc-ld PLATFORM=MINGW install)
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


I modified it to use only one core (remove -mmt0 and add back -j 2 to put that back) and work more efficiently (only compress tesseract once).