aboutsummaryrefslogtreecommitdiff
path: root/gitrev.sh
diff options
context:
space:
mode:
authortheuni <theuni@svn>2010-02-06 03:17:55 +0000
committertheuni <theuni@svn>2010-02-06 03:17:55 +0000
commit340b36d700dc61034e2d97ce3342b3fbd382f9bb (patch)
treec1ee0cd72c914376d0f1d904d7900b74da46c701 /gitrev.sh
parent28eeca5180ccc9c3df3dd73674bb335410fa4ceb (diff)
fixed: configure would hang forever when using a pure git repo
added: let pure git repo get the correct svn revision git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@27498 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'gitrev.sh')
-rwxr-xr-xgitrev.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/gitrev.sh b/gitrev.sh
new file mode 100755
index 0000000000..a1ade00a18
--- /dev/null
+++ b/gitrev.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+N=0
+R=""
+MAX=1
+while [[ $N -le $MAX && "x$R" == "x" ]]
+do
+ R=$(git log -1 --pretty=format:%b HEAD~$N | sed -e 's/.*@\([0-9]\+\) .*/\1/')
+ N=$[$N+1]
+done
+if [[ "x$R" != "x" ]]; then
+ if [[ $N > 1 ]]; then
+ R=$R\+$((N-1))
+ fi
+ echo $R
+fi