@matheusbsbs / matheus-bagliano / commits / f0a77fd218
Fork 0

Simplify maintainer local test & installation script.

Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jan 6, 2006 at 21:24 UTC f0a77fd218a2c07c174aa34314e3fa160c142129
1 file changed +22 -39
Doit
+22 -39
@@ -1,44 +1,27 @@
1 #!/bin/sh
2
3 -try_if_new () {
4 - branch="$1"
5 - to_install="$2"
6 - commits=$(git-rev-list "ko-${branch}..${branch}")
3 +J='-l 2.5 -j'
4
8 - to_build=no
9 - case "$commits" in
10 - '')
11 - echo "* Up-to-date at ko-$branch"
12 - to_build=no
13 - ;;
14 - *)
15 - to_build=yes
16 - ;;
17 - esac
18 -
19 - case "$to_install" in
20 - ?*)
21 - to_build=yes
22 - ;;
23 - esac
24 -
25 - case "$to_build" in
26 - yes)
27 - Meta/Make clean >/dev/null 2>&1 &&
28 - git checkout "$branch" &&
29 - echo "* Testing $branch" &&
30 - Meta/Make clean test >./":${branch}.log" 2>&1 &&
31 - case "$to_install" in
32 - ?*)
33 - Meta/Make install >>./":${branch}.log" 2>&1 ;;
34 - esac
35 - esac
5 +test -z "$(git diff --cached --name-status)" || {
6 + echo >&2 "Repository unclean."
7 + exit 1
8 }
9
38 -git fetch ko &&
39 -
40 -try_if_new maint &&
41 -try_if_new pu &&
42 -try_if_new master install &&
43 -Meta/Make clean >/dev/null 2>&1
44 -
10 +nstall=install
11 +for branch in naster master maint pu
12 +do
13 + rm -f ./:$branch.log &&
14 + if git rev-parse --verify refs/heads/$branch 2>/dev/null
15 + then
16 + echo "* $branch" &&
17 + git checkout $branch || break
18 + {
19 + make $J $nstall &&
20 + make test &&
21 + make clean
22 + } >./:$branch.log &&
23 + nstall=all || exit $?
24 + else
25 + echo "* No $branch"
26 + fi
27 +done