2006-01-30 16:04:19 -05:00
|
|
|
#!/bin/sh
|
2006-01-06 12:46:49 -05:00
|
|
|
|
|
|
|
if [ ! -z $1 ] ; then
|
|
|
|
if [ $1 = force ] ; then
|
|
|
|
rm -f .version
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2006-01-27 16:33:45 -05:00
|
|
|
force=0
|
2006-01-06 12:46:49 -05:00
|
|
|
version=`svnversion . -n || echo hacked`
|
|
|
|
oldversion=`cat .version 2>/dev/null || echo "0"`
|
2006-01-27 16:33:45 -05:00
|
|
|
grep "@SVN_VERSION@" src/include/switch_version.h && force=1
|
2006-01-06 12:46:49 -05:00
|
|
|
|
2006-01-27 16:33:45 -05:00
|
|
|
if [ $oldversion != $version ] || [ $force = 1 ] ; then
|
2006-01-06 12:46:49 -05:00
|
|
|
cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/$version/g" > src/include/switch_version.h
|
|
|
|
echo $version > .version
|
2006-01-14 13:55:20 -05:00
|
|
|
make modclean
|
2006-01-06 12:46:49 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|