2 # creates a c header file with the current subversion version
3 # This script should be run within the source directory.
7 FILE
="texk/web2c/luatexdir/luatex_svnversion.h"
12 echo '#define luatex_svn_revision -1' > $FILE
14 if ( svn info .
>/dev
/null
2>&1 && svnversion
> /dev
/null
)
18 SVNREV
=`svnversion -c . | sed -ne 's/^[0-9]*:*\([0-9]*\).*/#define luatex_svn_revision \1/p'`
19 test "$DEFREV" != "$SVNREV" && echo "$SVNREV" > $FILE
20 elif ( [ -f ..
/.git
/refs
/remotes
/git-svn
] ||
[ -d ..
/.git
/svn
] && git svn
--version > /dev
/null
)
23 SVNREV
=`git svn info | sed -ne 's/^Revision: \([0-9]*\).*$/#define luatex_svn_revision \1/p'`
24 test "$DEFREV" != "$SVNREV" && echo "$SVNREV" > $FILE