aboutsummaryrefslogtreecommitdiffstats
path: root/svn_version.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsvn_version.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/svn_version.sh b/svn_version.sh
new file mode 100755
index 0000000..82df1b9
--- /dev/null
+++ b/svn_version.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# $Id$
+# $URL$
+
+
+OLD_VERSION=`cat svn_version.h 2>/dev/null`
+
+if [ -d .svn ]; then
+ NEW_VERSION="#define SVN_VERSION \"`svnversion -n`\""
+fi
+
+if [ "$NEW_VERSION" != "$OLD_VERSION" ]; then
+ echo $NEW_VERSION >svn_version.h
+fi