On 15 March 2010 07:47, Taco Hoekwater <t...@elvenkind.com> wrote: > T T wrote: > >> I would also suggest to remove the 'svn up' from the script. While >> working on/testing local changes you do not necessarily want to keep >> the working copy in sync with the head. And perhaps > > Perhaps the call to getluatexsvnversion.sh should be an explicit > option for build.sh instead of implied, but I prefer the rev. number > to reflect the actual state of the repository, so I would like to > leave the svn up command in it.
This is just a suggestion, but I think that the decision whether to svn up or not should be configurable somehow. There might be justified reasons why one doesn't want to do that (e.g. svn doesn't work for me here because of proxy -- every time it stalls until timeout making it quite annoying). >> luatex_svnversion.h could be created/updated only when the revision >> number actually changes rather than every time (i.e. read the old > > Probably. As I wrote above, I am not that good in shell either, > and the generated header is not in the repository so I don't think > it matters a whole lot, but if someone writes a patch I will apply it. OK, here we go: ---8<-------------cut--here------------------>8--- #! /bin/sh # This script should be run within the source directory. $DEBUG FILE="texk/web2c/luatexdir/luatex_svnversion.h" LANG=C if [ ! -r $FILE ] then echo '#define luatex_svn_revision -1' > $FILE fi if ( [ -d ./.svn ] && svnversion > /dev/null ) then # svn up > /dev/null DEFREV=`cat $FILE` SVNREV=`svnversion -c . | sed -ne 's/^[0-9]*:*\([0-9]*\).*/#define luatex_svn_revision \1/p'` test "$DEFREV" != "$SVNREV" && echo "$SVNREV" > $FILE fi ---8<-------------cut--here------------------>8--- Cheers, Tomek _______________________________________________ dev-luatex mailing list dev-luatex@ntg.nl http://www.ntg.nl/mailman/listinfo/dev-luatex