KO procedure updates.
[git.git] / Doit
1 #!/bin/sh
2
3 try_if_new () {
4         branch="$1"
5         to_install="$2"
6         commits=$(git-rev-list "ko-${branch}..${branch}")
7
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
36 }
37
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