--- /dev/null
+#!/bin/sh
+
+try_if_new () {
+ branch="$1"
+ to_install="$2"
+ commits=$(git-rev-list "ko-${branch}..${branch}")
+
+ 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
+}
+
+git fetch ko &&
+
+try_if_new maint &&
+try_if_new pu &&
+try_if_new master install &&
+Meta/Make clean >/dev/null 2>&1
+
--- /dev/null
+#!/bin/sh
+
+m=$(git-rev-parse "master^0")
+for branch
+do
+ b=$(git-rev-parse "$branch^0")
+ case "$(git-merge-base --all "$b" "$m")" in
+ "$m")
+ echo >&2 "$branch: up to date"
+ continue
+ ;;
+ esac
+ git-show-branch "$branch" master
+ while :
+ do
+ echo -n >&2 "Rebase $branch [Y/n]? "
+ read ans
+ case "$ans" in
+ [Yy]*)
+ git rebase master "$branch" || exit
+ break
+ ;;
+ [Nn]*)
+ echo >&2 "Not rebasing $branch"
+ break
+ ;;
+ *)
+ echo >&2 "Sorry, I could not hear you"
+ ;;
+ esac
+ done
+done