Files
git/Doit
2007-04-03 01:08:20 -07:00

46 lines
901 B
Bash
Executable File

#!/bin/sh
: ${J=-j2}
while case "$1" in -pedantic) M=$1 ;; *) break ;; esac
do
shift
done
test -z "$(git diff --cached --name-status)" || {
echo >&2 "Repository unclean."
exit 1
}
Meta/Make clean >/dev/null 2>&1
: ${branches='next master maint pu'}
nstall=install
for branch in $branches
do
revision=$(git show-ref -s --verify "refs/heads/$branch") || {
echo "** No $branch"
continue
}
if installed=$($HOME/git-$branch/bin/git version) &&
version=$(expr "$installed" : '.*\.g\([0-9a-f]*\)$') &&
version=$(git rev-parse --verify "$version") &&
test "z$version" = "z$revision"
then
echo "* up-to-date version \"$installed\" is already installed from $branch"
continue
fi
echo "** $branch" &&
git checkout $branch &&
Meta/Make $M -- $J all &&
Meta/Make $M -- $J $nstall &&
Meta/Make $M -- test &&
Meta/Make clean || exit $?
done >./:all.log 2>&1
git checkout master