From: Stephen Rothwell Date: Wed, 18 Jan 2023 23:56:19 +0000 (+1100) Subject: do_merge: add the -c (continue) option X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=a0eace456c9973c00e4fdca4961ccb4bcbcda97c;p=next-scripts do_merge: add the -c (continue) option This starts mergeing again from where we left off i.e. the tree after the last entry in the SHA`s file. --- diff --git a/do_merge b/do_merge index b678993..c3d3ead 100755 --- a/do_merge +++ b/do_merge @@ -2,9 +2,14 @@ no_build=false start_from="" +do_continue=false -while getopts 'ns:' opt; do +while getopts 'cns:' opt; do case "$opt" in + c) + do_continue=true + ;; + n) no_build=true ;; @@ -48,6 +53,10 @@ fix_up() fi } +if $do_continue; then + last=$(tail -n1 "$SHA1_FILE" | cut -f1 -d"$_TAB") + start_from=$(get_branches | sed -n '/^'"$last"'$/{n;p;}') +fi if [ -z "$start_from" ]; then cp /dev/null "$LOG_FILE" execute date -R