striker-collect-debug: create output dir only when necessary

Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
main
Fabio M. Di Nitto 9 months ago
parent da67156ee1
commit 3b018e56c6
  1. 8
      tools/striker-collect-debug

@ -155,6 +155,8 @@ sub process_output
if ($output_directory ne "/")
{
print "Preparing local machine\n";
if (! -d $output_directory) {
print "- Creating the output directory: [".$output_directory."]... ";
my $failed = $anvil->Storage->make_directory({directory => $output_directory});
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { failed => $failed }});
@ -163,6 +165,12 @@ sub process_output
print "Failed!\nUnable to create the directory: [".$anvil->data->{sys}{compile_directory}."]. The error should be logged.\n";
$anvil->nice_exit({exit_code => 1});
}
print "Done!\n";
}
else
{
print "- Output directory [".$output_directory."] already exists.\n";
}
}
$tarball = $output_directory."/".$output_file;

Loading…
Cancel
Save