From d1bedaca10ed4c5983eb2c3381896525a4d4d403 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 29 Oct 2015 20:49:13 -0400 Subject: src/main.sh: New -m option --- 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 Show in the user interface -o Log output to 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 -- cgit v0.9.1