Adjust for use on kernel.org
[git/spearce.git] / Doit
blob7c70f94ee0eae11405a6ff08851c136a215fb16e
1 #!/bin/sh
3 try_if_new () {
4 branch="$1"
5 to_install="$2"
6 commits=$(git-rev-list "ko-${branch}..${branch}")
8 to_build=no
9 case "$commits" in
10 '')
11 echo "* Up-to-date at ko-$branch"
12 to_build=no
15 to_build=yes
17 esac
19 case "$to_install" in
20 ?*)
21 to_build=yes
23 esac
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
38 git fetch ko &&
40 try_if_new maint &&
41 try_if_new pu &&
42 try_if_new master install &&
43 Meta/Make clean >/dev/null 2>&1