always update svnrevision.h, also work with git svn
[bachelor-thesis/roomba_tests.git] / svnrevision.sh
index 67b03a2..072d714 100755 (executable)
@@ -1,8 +1,16 @@
 #!/bin/bash
+if [ -d .svn ]; then
+  revision=$(svn info|grep Revision|sed 's/Revision: //')
+  stat=$(svn status|grep '^M')
+elif [ -d .git/svn ]; then
+  revision=$(git svn info|grep Revision|sed 's/Revision: //')
+  stat=$(git status|grep 'modified: ')
+else
+  echo No SVN working copy!
+  exit 1;
+fi;
 
-revision=$(svn info|grep Revision|sed 's/Revision: //')
-
-if [ -n "$(svn status|grep '^M')" ]; then
+if [ -n "$stat" ]; then
   status=" with local changes"
 else
   status=""
This page took 0.027028 seconds and 4 git commands to generate.