]> git.ozlabs.org Git - next-scripts/commitdiff
do_merge: add the -c (continue) option
authorStephen Rothwell <sfr@canb.auug.org.au>
Wed, 18 Jan 2023 23:56:19 +0000 (10:56 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 18 Jan 2023 23:56:19 +0000 (10:56 +1100)
This starts mergeing again from where we left off i.e. the
tree after the last entry in the SHA`s file.

do_merge

index b678993581fe17693b91a7ca4cd5741645aedfd5..c3d3ead957b03516945ffe55747a812e65d33177 100755 (executable)
--- 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