From: Arnaud Lacombe <al@sigfpe.info>
[apps/madmutt.git] / do-commit.sh
index 3faaecb..4cb7e7c 100755 (executable)
@@ -1,5 +1,8 @@
 #!/bin/sh
 svn update
-CURREV=`svn info | grep '^Revision' | cut -d : -f 2`
-echo "`echo $CURREV+1 | bc`" > ./VERSION.svn
-svn commit "$@"
+echo "`svn info | awk -F': ' '/^Revision: / {print $2}'`+1" | bc > ./VERSION.svn
+if [ x"$1" != x ] ; then
+  svn commit do-commit.sh VERSION.svn "$@"
+else
+  svn commit
+fi