Make: set ASCIIDOC_NO_ROFF unconditionally for now
[git/spearce.git] / Dothem
blobc503a3767d57a869b26ed2eb6ffea60303c05c2e
1 #!/bin/sh
3 : ${J=-j2}
4 : ${BUILDBASE=../buildfarm}
5 : ${branches='next master maint pu jch'}
7 force= with_dash= M= install= nodoc=
8 while case "$1" in
9 -pedantic) M=$1 ;;
10 -force) force=$1 ;;
11 -dash) with_dash=y ;;
12 -noinstall) install=noinstall ;;
13 -nodoc) nodoc=y ;;
14 *) break ;;
15 esac
17 shift
18 done
19 test -f /bin/dash || with_dash=
21 for branch in $branches
23 echo "** $branch **"
24 revision=$(git show-ref -s --verify "refs/heads/$branch") || {
25 echo "** No $branch"
26 continue
28 test -d "$BUILDBASE/$branch" || {
29 echo "** No $BUILDBASE/$branch"
30 continue
33 private=$(git rev-parse -q --verify private-$branch 2>/dev/null)
34 case $? in 0|1) ;; *) exit $? ;; esac
36 if installed=$($HOME/git-$branch/bin/git version) &&
37 if version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)$')
38 then
40 elif version=v$(expr "$installed" : \
41 'git version \(.*\)\.rc[0-9]*$')
42 then
43 version="$version"-$(expr "$installed" : \
44 'git version .*\.\(rc[0-9]*\)$')
45 else
46 version=v$(expr "$installed" : 'git version \(.*\)')
47 fi &&
48 version=$(git rev-parse --verify "$version^0" 2>/dev/null) &&
49 test "z$version" = "z$revision"
50 then
51 echo "* up-to-date version \"$installed\" is already installed from $branch"
52 test -n "$force" || continue
56 case "$branch, $branches " in
57 jch,*' next '*)
58 if git diff --quiet --exit-code jch next
59 then
60 dotest=
61 else
62 dotest=test
66 dotest=test ;;
67 esac
69 cd "$BUILDBASE/$branch"
70 git reset --hard &&
71 git checkout "$branch" &&
72 git reset --hard || exit
73 case "$private" in
74 '')
76 ?*)
77 git merge --squash --no-commit "$private" || {
78 echo >&2 "Cannot apply private edition changes"
79 git reset --hard
82 esac &&
84 case "$with_dash" in
86 case "$branch" in
87 master | maint | next | jch)
88 Meta/Make $M -- $J SHELL_PATH=/bin/dash $dotest
90 esac
92 esac &&
94 Meta/Make $M -- $J $dotest &&
95 case "$branch" in
96 jch)
97 test -n "$nodoc" || Meta/Make $M -- doc install-doc
99 master | maint | next )
100 test -n "$nodoc" || Meta/Make $M -- doc
103 : ;;
104 esac &&
106 test z$install = znoinstall ||
107 Meta/Make $M -- install
108 } || exit $?
110 git reset --hard
111 ) || break;
113 done