summaryrefslogtreecommitdiff
path: root/Doit
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-01-07 05:24:51 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-01-07 05:24:51 (GMT)
commitf0a77fd218a2c07c174aa34314e3fa160c142129 (patch)
treebf7132f21fea234468593ab72091eb9b84c3208a /Doit
parent2dcfb57d0b15390f9e270a7466338fdc1f74aec4 (diff)
downloadgit-f0a77fd218a2c07c174aa34314e3fa160c142129.zip
git-f0a77fd218a2c07c174aa34314e3fa160c142129.tar.gz
git-f0a77fd218a2c07c174aa34314e3fa160c142129.tar.bz2
Simplify maintainer local test & installation script.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Doit')
-rwxr-xr-xDoit61
1 files changed, 22 insertions, 39 deletions
diff --git a/Doit b/Doit
index 7c70f94..a210b8f 100755
--- a/Doit
+++ b/Doit
@@ -1,44 +1,27 @@
#!/bin/sh
-try_if_new () {
- branch="$1"
- to_install="$2"
- commits=$(git-rev-list "ko-${branch}..${branch}")
+J='-l 2.5 -j'
- to_build=no
- case "$commits" in
- '')
- echo "* Up-to-date at ko-$branch"
- to_build=no
- ;;
- *)
- to_build=yes
- ;;
- esac
-
- case "$to_install" in
- ?*)
- to_build=yes
- ;;
- esac
-
- case "$to_build" in
- yes)
- Meta/Make clean >/dev/null 2>&1 &&
- git checkout "$branch" &&
- echo "* Testing $branch" &&
- Meta/Make clean test >./":${branch}.log" 2>&1 &&
- case "$to_install" in
- ?*)
- Meta/Make install >>./":${branch}.log" 2>&1 ;;
- esac
- esac
+test -z "$(git diff --cached --name-status)" || {
+ echo >&2 "Repository unclean."
+ exit 1
}
-git fetch ko &&
-
-try_if_new maint &&
-try_if_new pu &&
-try_if_new master install &&
-Meta/Make clean >/dev/null 2>&1
-
+nstall=install
+for branch in naster master maint pu
+do
+ rm -f ./:$branch.log &&
+ if git rev-parse --verify refs/heads/$branch 2>/dev/null
+ then
+ echo "* $branch" &&
+ git checkout $branch || break
+ {
+ make $J $nstall &&
+ make test &&
+ make clean
+ } >./:$branch.log &&
+ nstall=all || exit $?
+ else
+ echo "* No $branch"
+ fi
+done