From: Stephen Rothwell Date: Mon, 22 Dec 2008 00:39:12 +0000 (+1100) Subject: updates for not building some trees X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;h=be4ccfb0013b13cb27b73838dc9b90534bc6b89e;p=next-scripts updates for not building some trees --- diff --git a/do_merge1 b/do_merge1 index b930478..5eea77b 100755 --- a/do_merge1 +++ b/do_merge1 @@ -26,7 +26,11 @@ execute() heads=$(grep -v '^#' ../real_control | awk -F ' ' '$2=="quilt" { printf("quilt/%s ", $3); } $2=="git" { printf("%s/%s ", $3, $5); }') +need_build=false + for h in $heads; do + tree=${h%/*} + [ "$tree" == "quilt" ] && tree=${h#quilt/} log Merging $h old_head=$(git rev-parse HEAD) execute git merge $h || { @@ -35,9 +39,21 @@ for h in $heads; do GIT_EDITOR=: execute git commit -v -a execute git diff -M --stat --summary 'HEAD^..' } - new_head=$(git rev-parse HEAD) - [ "$old_head" = "$new_head" ] && continue $no_build && continue + $need_build || { + # See if we need to build after merging this tree + new_head=$(git rev-parse HEAD) + [ "$old_head" = "$new_head" ] || + need_build=true + $need_build || + [ "$(git diff ${old_head}.. | wc -c)" -eq 0 ] || + need_build=true + } + $need_build || + continue + do_build=$(grep -v '^#' ../real_control | awk -F ' ' '$3=="'$tree'" { print $6; }') + [ "$do_build" = "yes" ] || + continue rsync -avH --exclude .git --delete . "$build_host":"$build_dir"/. || { echo Rsync failed 1>&2 bash -i || exit @@ -46,6 +62,7 @@ for h in $heads; do echo Build failed 1>&2 bash -i || exit } + need_build=false done exit 0