From: Junio C Hamano Date: Tue, 27 Dec 2005 05:00:32 +0000 (-0800) Subject: Add Doit script. X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=c150b0e7f20fa5c674dab49be912338ae42aba77;p=git.git Add Doit script. --- diff --git a/Doit b/Doit new file mode 100755 index 00000000..7c70f94e --- /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 + diff --git a/R b/R new file mode 100755 index 00000000..146ad701 --- /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