]> git.ipfire.org Git - thirdparty/git.git/blob - Doit
Meta/V & Doit: what is installed could be -dirty.
[thirdparty/git.git] / Doit
1 #!/bin/sh
2
3 : ${J=-j2}
4 force=
5 while case "$1" in
6 -pedantic) M=$1 ;;
7 -force) force=$1 ;;
8 *) break ;;
9 esac
10 do
11 shift
12 done
13
14 test -z "$(git diff --cached --name-status)" || {
15 echo >&2 "Repository unclean."
16 exit 1
17 }
18 Meta/Make clean >/dev/null 2>&1
19
20 : ${branches='next master maint pu'}
21
22 nstall=install
23 for branch in $branches
24 do
25 echo >&3 "** $branch **"
26
27 revision=$(git show-ref -s --verify "refs/heads/$branch") || {
28 echo "** No $branch"
29 continue
30 }
31
32 if installed=$($HOME/git-$v/bin/git version) &&
33 {
34 version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)$') ||
35 version=v$(expr "$installed" : 'git version \(.*\)')
36 } &&
37 version=$(git rev-parse --verify "$version^0" 2>/dev/null) &&
38 test "z$version" = "z$revision"
39 then
40 echo "* up-to-date version \"$installed\" is already installed from $branch"
41 test -n "$force" || continue
42 fi
43
44 echo "** $branch" &&
45 git checkout $branch &&
46 Meta/Make $M -- $J all &&
47 Meta/Make $M -- $J $nstall &&
48 Meta/Make $M -- test &&
49 Meta/Make clean || exit $?
50
51 done >./:all.log 3>&2 2>&1
52
53 git checkout master
54
55