X-Git-Url: http://git.jankratochvil.net/?a=blobdiff_plain;f=bin%2Fdashtopatch;h=73952a0ad846b363dbe42e2c7435485646a74515;hb=9261c15af132a6cdc380f6bae89cdc8e35171391;hp=03ae6529a175637629b33acc26af371310c3f157;hpb=9654d9375035f42eee1b5eda8ed0d0e780fc301b;p=nethome.git diff --git a/bin/dashtopatch b/bin/dashtopatch index 03ae652..73952a0 100755 --- a/bin/dashtopatch +++ b/bin/dashtopatch @@ -1,25 +1,33 @@ #! /bin/sh set -ex +compile=false +if [ "$1" = -c ];then + compile=true + shift +fi if [ $# != 1 ] || ! echo "$1" | grep -q '-';then echo >&2 "Syntax: $0 branch-list-delimited-by-dashes" exit 1 fi -base="master" +base="gdb/master" gerrit=true if git branch -D gerrit;then - git checkout master + git checkout gdb/master git checkout -b gerrit else gerrit=false fi for elem in $(echo "$1"|tr '-' ' ');do - if [ "$base" = "master" ];then + if [ "$base" = "gdb/master" ];then next="$elem" else next="$base-$elem" fi git checkout "$next" - git merge "$base" + git merge --no-edit "$base" + if $compile;then + make + fi if [ -e "$next".patch ];then echo -e '/^--- /,$d\nw'|ed "$next".patch || : fi