From 2cf1416b221d6a7a2bc3ba6ac84b8d3d069bd891 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Mon, 1 Feb 2016 14:28:31 +0000 Subject: [PATCH] mg-show-flight-runvars: include $flight. prefix on job name if -r (recurse) Adds a new -r (==recurse) option which for now only adds "$flight." to the job name, i.e. nothing is recursive yet. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- mg-show-flight-runvars | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mg-show-flight-runvars b/mg-show-flight-runvars index 0cf4e13..f96539f 100755 --- a/mg-show-flight-runvars +++ b/mg-show-flight-runvars @@ -27,6 +27,7 @@ csreadconfig(); my $synthcond = '(NOT synth)'; my $synthsufx = ''; +my $recurse = 0; for (;;) { last unless @ARGV; @@ -36,6 +37,8 @@ for (;;) { if (m/^-a$/) { $synthcond = '(1=1)'; $synthsufx = '~'; + } elsif (m/^-r$/) { + $recurse = 1; } else { die "$_ ?"; } @@ -59,6 +62,7 @@ sub collect ($) { while (my (@row) = $q->fetchrow_array()) { my $synth = shift @row; + $row[0] = "$flight.$row[0]" if $recurse; $row[1] .= $synthsufx if $synth && $synth ne 'f'; # sqlite3 is typeless push @rows, \@row; } -- 2.39.5