What's cooking update
[git/spearce.git] / V
blob866ddc251b0f0d2bd8deab90d7a35b63d63a3616
1 #!/bin/sh
3 for v in maint master next pu jch
4 do
5 installed=$($HOME/git-$v/bin/git version)
6 dirty=
7 if version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)$')
8 then
10 elif version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)\.dirty$')
11 then
12 dirty=t
13 elif version=v$(expr "$installed" : \
14 'git version \(.*\)\.rc[0-9]*$')
15 then
16 version="$version"-$(expr "$installed" : \
17 'git version .*\.\(rc[0-9]*\)$')
18 else
19 version=v$(expr "$installed" : 'git version \(.*\)')
22 version=$(git rev-parse --verify "$version^0" 2>/dev/null)
23 revision=$(git show-ref -s --verify "refs/heads/$v")
24 if test "z$version" = "z$revision"
25 then
26 in= out=
27 installed=${dirty:+" (with changes)"}
28 else
29 installed=$(git describe $version)
30 case "$dirty" in
32 installed="$installed.dirty"
33 esac
34 in="\e[41;37m" out="\e[m" installed=" $installed"
36 echo "$in$v$out $(git describe refs/heads/$v)$installed"
37 done