]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
version stuff
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 6 Jan 2006 17:46:49 +0000 (17:46 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 6 Jan 2006 17:46:49 +0000 (17:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@300 d0543943-73ff-0310-b7d9-9358b9ac24b2

checkversion.sh [new file with mode: 0755]

diff --git a/checkversion.sh b/checkversion.sh
new file mode 100755 (executable)
index 0000000..365e314
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ ! -z $1 ] ; then
+    if [ $1 = force ] ; then
+       rm -f .version
+    fi
+fi
+
+version=`svnversion . -n || echo hacked`
+oldversion=`cat .version 2>/dev/null || echo "0"`
+
+if [ $oldversion != $version ] ; then
+    cat src/include/switch_version.h.in | sed "s/@SVN_VERSION@/$version/g" > src/include/switch_version.h
+    echo $version > .version
+fi
+
+
+