From: Stephen Rothwell Date: Fri, 1 Jun 2018 04:49:20 +0000 (+1000) Subject: fetch_trees: -n means to start wherever we are up to in the merge X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=4fdcb38d5b4efbd4efc8e618ae4975b5a2a72e73;p=next-scripts fetch_trees: -n means to start wherever we are up to in the merge --- diff --git a/fetch_trees b/fetch_trees index d163bba..88efd94 100755 --- a/fetch_trees +++ b/fetch_trees @@ -1,5 +1,13 @@ #!/bin/bash +. "$(dirname $0)/common.sh" "" + +[ "$1" = "-n" ] && { + shift + last=$(tail -n1 $SHA1_FILE | cut -f1 -d$'\t') + start_from=$(awk -F '\t' '$3 == "'$last'" { getline; print $3; exit 0; }' $CTRL_FILE) +} + [ "$1" = "-s" ] && { shift start_from="$1" @@ -10,8 +18,6 @@ shift } -. "$(dirname $0)/common.sh" "" - get_field() { grep -v '^#' $CTRL_FILE |