]> git.ozlabs.org Git - next-scripts/commitdiff
begin to hide away the CRTL_FILE accesses
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Sep 2021 22:06:27 +0000 (08:06 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 16 Sep 2021 22:06:27 +0000 (08:06 +1000)
common.sh
do_merge

index d4e3350ab13d5907651e6624d6d47a1e82817f67..8e9f484d13ef16939ab16216807ace2330d6c5ac 100644 (file)
--- 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"
index 955f52a4e82c0d90f510e595a41aeb3e8b2fd4b5..d7ecb2f06c373da945bd450740172ec210b4b1d8 100755 (executable)
--- 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