print SVN revision in log output
[bachelor-thesis/roomba_tests.git] / svnrevision.sh
diff --git a/svnrevision.sh b/svnrevision.sh
new file mode 100755 (executable)
index 0000000..67b03a2
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+revision=$(svn info|grep Revision|sed 's/Revision: //')
+
+if [ -n "$(svn status|grep '^M')" ]; then
+  status=" with local changes"
+else
+  status=""
+fi;
+
+echo '// This file is created automatically, your changes will be lost.' > svnrevision.h
+echo '#define SVNREVISION "r'$revision$status'"'  >> svnrevision.h
+
This page took 0.027331 seconds and 4 git commands to generate.