parser.add_option('-v', '--verbose', dest='verbose', action='store_true',
default=False,
help='turn on verbose mode')
+ parser.add_option('--dry-run', action='store_true', default=False,
+ help="Don't delete anything (in clean mode)")
+
commands = optparse.OptionGroup(parser, 'Commands')
commands.add_option('-s', '--summary', dest='summary', action='store_true',
default=False,
help='create run-xml summary, compress the eland result files, and '
'copy them and the Summary.htm file into archival directory.')
+ commands.add_option('-c', '--clean', action='store_true', default=False,
+ help='Clean runfolder, preparing it for long-term storage')
parser.add_option_group(commands)
parser.add_option('-o', '--output-dir', default=None,
if opt.extract_results:
runfolder.extract_results(runs, opt.output_dir)
command_run = True
+ if opt.clean:
+ runfolder.clean_runs(runs, opt.dry_run)
+ command_run = True
+
if command_run == False:
print "You need to specify a command."+os.linesep
parser.print_help()