From f0849d63e02a5bf561debb751584e45b22a66abe Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Fri, 17 Sep 2021 08:06:27 +1000 Subject: [PATCH] begin to hide away the CRTL_FILE accesses --- common.sh | 5 +++++ do_merge | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) 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 -- 2.39.5