c90f41000622f143885246f179c72cd948437cbc
4 revision
=$
(svn info
2>&1|
grep Revision|
sed 's/Revision: //')
5 stat
=$
(svn status
2>&1|
grep '^M')
7 # if that fails, try git-svn
8 if [ -z "$revision" ]; then
9 revision
=$
(git svn info
2>&1|
grep Revision|
sed 's/Revision: //')
10 stat
=$
(git status
2>&1|
grep 'modified: ');
13 # if that fails, give up
14 if [ -z "$revision" ]; then
15 $revision="No SVN or git-svn working copy!"
17 if [ -n "$stat" ]; then
18 status
=" with local changes"
24 echo '// This file is created automatically, your changes will be lost.' > svnrevision.h
25 echo '#define SVNREVISION "r'$revision$status'"' >> svnrevision.h
This page took 0.039782 seconds and 3 git commands to generate.