2006-01-30 21:04:19 +00:00
|
|
|
#!/bin/sh
|
2006-01-06 17:46:49 +00:00
|
|
|
|
|
|
|
if [ ! -z $1 ] ; then
|
|
|
|
if [ $1 = force ] ; then
|
|
|
|
rm -f .version
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2006-01-27 21:33:45 +00:00
|
|
|
force=0
|
2006-01-06 17:46:49 +00:00
|
|
|
version=`svnversion . -n || echo hacked`
|
|
|
|
oldversion=`cat .version 2>/dev/null || echo "0"`
|
2006-01-27 21:33:45 +00:00
|
|
|
grep "@SVN_VERSION@" src/include/switch_version.h && force=1
|
2006-01-06 17:46:49 +00:00
|
|
|
|
2006-01-27 21:33:45 +00:00
|
|
|
if [ $oldversion != $version ] || [ $force = 1 ] ; then
|
2006-01-06 17:46:49 +00: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 18:55:20 +00:00
|
|
|
make modclean
|
2006-01-06 17:46:49 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|