]> git.ozlabs.org Git - next-scripts/blobdiff - do_merge
tidy up some awk invocations
[next-scripts] / do_merge
index d1c52e71dea8bf4ba672b21ed1cea5d416f0e778..391fbee01a43508ba09ad4eece8bc661c3f40fa8 100755 (executable)
--- a/do_merge
+++ b/do_merge
@@ -91,7 +91,7 @@ do_rebase()
 
 }
 
-heads=$(grep -v '^#' "$CTRL_FILE" | awk -F '\t' '$2=="quilt" || $2=="git" { printf("%s/%s ", $3, $5); } $2=="branch" { printf("branch/%s ", $1); }')
+heads=$(awk -F '\t' '/^#/ { next; } $2=="quilt" || $2=="git" { printf("%s/%s ", $3, $5); } $2=="branch" { printf("branch/%s ", $1); }' "$CTRL_FILE")
 
 need_build=false
 
@@ -179,7 +179,7 @@ for h in $heads; do
        }
        $need_build ||
                continue
-       do_build=$(grep -v '^#' $CTRL_FILE | awk -F '   ' '$3=="'$tree'" { print $6; }')
+       do_build=$(awk -F '\t' '/^[^#]/ && $3=="'$tree'" { print $6; }' "$CTRL_FILE")
        [ "$do_build" = "yes" ] ||
                continue
        git push -f "${build_host}${build_host:+:}${build_dir}" master:refs/heads/next || {