Commit 0c285ace authored by Leigh Stoller's avatar Leigh Stoller

Add a silent option and redirect the "dot" output to /dev/null. Not

worth seeing.
parent 641b2dce
......@@ -783,7 +783,8 @@ if ($modify) {
#
# Generate the graph for the template.
#
system("$makegraph $guid");
print "Generating graph\n";
system("$makegraph -s $guid");
fatal(-1, "Error generating template graph.")
if ($?);
......
......@@ -22,9 +22,10 @@ sub usage()
"<guid> - GUID to graph\n");
exit(-1);
}
my $optlist = "p:z:d";
my $optlist = "p:z:ds";
my %options = ();
my $debug = 0;
my $silent = 0;
my $prefix = "/tmp/dot$$";
my $scale = 1.0;
my $zoom;
......@@ -293,8 +294,10 @@ close(DOT);
#
# Now run dot and generate both a gif and an image map file.
#
system("$DOT -Tgif -o $giffile $dotfile");
system("$DOT -Tcmapx -o $imapfile $dotfile");
my $redirect = ($silent ? "> /dev/null 2>&1" : "");
system("$DOT -Tgif -o $giffile $dotfile $redirect");
system("$DOT -Tcmapx -o $imapfile $dotfile $redirect");
#
# Grab the input data.
......@@ -361,6 +364,9 @@ sub ParseArgs()
if (defined($options{"d"})) {
$debug = 1;
}
if (defined($options{"s"})) {
$silent = 1;
}
if (defined($options{"z"})) {
$zoom = $options{"z"};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment