4 : ${BUILDBASE=../buildfarm}
5 : ${branches='next master maint pu jch'}
7 force= with_dash= M= install= nodoc=
12 -noinstall) install=noinstall ;;
19 test -f /bin/dash || with_dash=
21 for branch in $branches
24 revision=$(git show-ref -s --verify "refs/heads/$branch") || {
28 test -d "$BUILDBASE/$branch" || {
29 echo "** No $BUILDBASE/$branch"
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]*\)$')
40 elif version=v$(expr "$installed" : \
41 'git version \(.*\)\.rc[0-9]*$')
43 version="$version"-$(expr "$installed" : \
44 'git version .*\.\(rc[0-9]*\)$')
46 version=v$(expr "$installed" : 'git version \(.*\)')
48 version=$(git rev-parse --verify "$version^0" 2>/dev/null) &&
49 test "z$version" = "z$revision"
51 echo "* up-to-date version \"$installed\" is already installed from $branch"
52 test -n "$force" || continue
56 case "$branch, $branches " in
58 if git diff --quiet --exit-code jch next
69 cd "$BUILDBASE/$branch"
71 git checkout "$branch" &&
72 git reset --hard || exit
77 git merge --squash --no-commit "$private" || {
78 echo >&2 "Cannot apply private edition changes"
87 master | maint | next | jch)
88 Meta/Make $M -- $J SHELL_PATH=/bin/dash $dotest
94 Meta/Make $M -- $J $dotest &&
97 test -n "$nodoc" || Meta/Make $M -- doc install-doc
99 master | maint | next )
100 test -n "$nodoc" || Meta/Make $M -- doc
106 test z$install = znoinstall ||
107 Meta/Make $M -- install