From: Stephen Rothwell Date: Thu, 16 Sep 2021 22:06:27 +0000 (+1000) Subject: begin to hide away the CRTL_FILE accesses X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=f0849d63e02a5bf561debb751584e45b22a66abe;p=next-scripts begin to hide away the CRTL_FILE accesses --- diff --git a/common.sh b/common.sh index d4e3350..8e9f484 100644 --- a/common.sh +++ b/common.sh @@ -59,6 +59,11 @@ get_url() awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $4; }' $CTRL_FILE } +get_build_flag() +{ + awk -F '\t' '/^[^#]/ && $3=="'"$1"'" { print $6; }' $CTRL_FILE +} + check_unmerged_files() { local tree="$1" diff --git a/do_merge b/do_merge index 955f52a..d7ecb2f 100755 --- a/do_merge +++ b/do_merge @@ -139,8 +139,7 @@ for h in $heads; do continue fi - do_build=$(awk -F '\t' '/^[^#]/ && $3=="'"$tree"'" { print $6; }' "$CTRL_FILE") - if [ "$do_build" != "yes" ]; then + if [ "$(get_build_flag "$tree")" != "yes" ]; then continue fi