fixed: ticket #10868 - "albums"-type Smart Playlists don't behave like the built...
[xbmc:xbmc-antiquated.git] / gitrev.sh
1 #!/bin/sh
2 N=0
3 R=""
4 MAX=50
5 while [ $N -le $MAX ] && [ "x$R" = "x" ]
6 do
7   R=$(git log -1 --pretty=format:%b HEAD~$N | awk '$2 ~ /@([0-9]+)$/ {sub(".*@", "", $2); print $2}')
8   N=$(($N+1))
9 done
10 if [ "x$R" != "x" ]; then
11   if [ $N -gt 1 ]; then
12     R=$R\+$((N-1))
13   fi
14   echo $R
15 fi