Skip to content

Commit

Permalink
Merge pull request #5515 from BOINC/dpa_vbox_demo3
Browse files Browse the repository at this point in the history
server: add error-checking to demo_submit script
  • Loading branch information
AenBleidd authored Feb 7, 2024
2 parents 3c7e18e + 08b228a commit b77fe91
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/demo_submit
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ for ($i=2; $i<$argc; $i++){
if (!is_file($fname)) {
die("no such file: $fname\n");
}
system("cp $fname `bin/dir_hier_path $fname`");
system("cp $fname `bin/dir_hier_path $fname`", $ret);
if ($ret) {
die("Couldn't stage file\n");
}
$file_list[] = $fname;
}

Expand All @@ -63,7 +66,10 @@ $wu_name = sprintf('%s_%d', $appname, time());
$cmd = sprintf('bin/create_work --appname %s --wu_name %s %s',
$appname, $wu_name, implode(' ', $file_list)
);
system($cmd);
system($cmd, $ret);
if ($ret) {
die("Couldn't create job\n");
}

echo "Job name: $wu_name\n";

Expand Down

0 comments on commit b77fe91

Please sign in to comment.