#!perl
chdir "../";
# SARA On Demand script for Government Customer
# Move this to the sara root directory if you want to use it
@MYARG = @ARGV;
$cnt = 0;
for (@MYARG) {
  $cnt++;
print;
  if (/\-d/) {
     $rdir = "$MYARG[$cnt]";
  }
}
system ("./sara @ARGV\n");
if ("$rdir") {
  chdir "results/$rdir";
  `mv report.html "$rdir-report.html"`;
  `mv report.csv  "$rdir-report.csv"`;
  `mv report.xml  "$rdir-report.xml"`;
}
