Skip to content

Commit

Permalink
Show version in script help messages
Browse files Browse the repository at this point in the history
  • Loading branch information
lhelwerd committed Jul 26, 2024
1 parent 31977b0 commit 85ac3f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/args.r
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

if (!exists('INC_ARGS_R')) {
INC_ARGS_R <- T
VERSION <- "0.0.1"

library(optparse)

Expand All @@ -42,7 +43,11 @@ if (!exists('INC_ARGS_R')) {
}
index <- index + 1
}
parser <<- OptionParser(option_list=options, description=desc)
parser <<- OptionParser(option_list=options,
description=paste(desc,
paste("GROS data analysis",
"version", VERSION),
sep="\n"))

if (exists('INC_LOG_R')) {
parser <<- add_option(parser, c("-l", "--log"), default='WARNING',
Expand Down

0 comments on commit 85ac3f3

Please sign in to comment.