version.sh 375 Bytes
Newer Older
1 2
#!/bin/sh
VER=`svnversion .`
Eric Petit's avatar
Eric Petit committed
3 4
if [ "x$VER" != x -a "$VER" != exported ]
then
Loren Merritt's avatar
Loren Merritt committed
5
  echo "#define X264_VERSION \" svn-$VER\"" >> config.h
6
  VER=`echo $VER | sed -e 's/[^0-9].*//'`
Eric Petit's avatar
Eric Petit committed
7
else
Loren Merritt's avatar
Loren Merritt committed
8
  echo "#define X264_VERSION \"\"" >> config.h
9
  VER="x"
10
fi
11 12
API=`grep '#define X264_BUILD' < x264.h | sed -e 's/.* \([1-9][0-9]*\).*/\1/'`
echo "#define X264_POINTVER \"0.$API.$VER\"" >> config.h