From 85ac3f39808d29b79c85e95457b4a9acfdb62be4 Mon Sep 17 00:00:00 2001 From: Leon Helwerda Date: Fri, 26 Jul 2024 13:51:00 +0200 Subject: [PATCH] Show version in script help messages --- include/args.r | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/args.r b/include/args.r index 2237e4b..29a4e3e 100644 --- a/include/args.r +++ b/include/args.r @@ -18,6 +18,7 @@ if (!exists('INC_ARGS_R')) { INC_ARGS_R <- T + VERSION <- "0.0.1" library(optparse) @@ -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',