diff options
-rw-r--r-- | src/main.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main.sh b/src/main.sh index 42e4d96..e9eb321 100644 --- a/src/main.sh +++ b/src/main.sh @@ -32,6 +32,7 @@ Options: -V Display version information -i {cli|tui} Select either a textual user interface or a command line interface (default: cli) + -m <message> Show <message> in the user interface -o <file> Log output to <file> Actions: @@ -54,10 +55,11 @@ main() { local opt= local ui='cli' + local msg='' local action= unset OPTARG - while getopts 'hVi:o:' opt; do + while getopts 'hVi:m:o:' opt; do case "${opt}" in 'h') help @@ -70,6 +72,9 @@ main() 'i') ui="${OPTARG}" ;; + 'm') + msg="${OPTARG}" + ;; 'o') log_init "${OPTARG}" ;; @@ -94,6 +99,9 @@ main() if ! init_ui "${ui}"; then exit 1 fi + if [ "x${msg}" != 'x' ]; then + message "${msg}" + fi srand $(expr ${$} + $(date '+%s')) init_temp_dir |