Commit 35fd9649 authored by Lena Hersemann's avatar Lena Hersemann

added code snippet to show the help if no script parameter is provided or if...

added code snippet to show the help if no script parameter is provided or if the `--help` was requested
parent 0ebea2d2
......@@ -66,6 +66,14 @@ if(!file.exists(r_script)){
}
## show help if no script parameter is provided or if --help was set
if (identical(scriptArgs, character(0)) || scriptArgs == "--help") {
cat("\n")
system(sprintf("Rscript %s --help", opts$r_script))
cat("\n")
quit()
}
# check previous script versions
script_name <- str_replace(basename(r_script), ".R", "")
......
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