Add Doit script.
Junio C Hamano committed
Dec 26, 2005 at 21:00 UTC
c150b0e7f20fa5c674dab49be912338ae42aba77
2 files changed
+76
Doit
+44
new file mode 100755
index 0000000000..7c70f94ee0
--- /dev/null
+++ b/Doit
@@ -0,0 +1,44 @@
+#!/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
+
R
+32
new file mode 100755
index 0000000000..146ad7015a
--- /dev/null
+++ b/R
@@ -0,0 +1,32 @@
+#!/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