summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-29 20:49:13 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-29 20:49:13 (EDT)
commitd1bedaca10ed4c5983eb2c3381896525a4d4d403 (patch)
tree6d57185ce5b85f380608073969153b26763b3db2 /src
parent869b1875f2febe169f5701e41de3e653e7a8343c (diff)
downloadfirman.sh-d1bedaca10ed4c5983eb2c3381896525a4d4d403.zip
firman.sh-d1bedaca10ed4c5983eb2c3381896525a4d4d403.tar.gz
firman.sh-d1bedaca10ed4c5983eb2c3381896525a4d4d403.tar.bz2
src/main.sh: New -m option
Diffstat (limited to 'src')
-rw-r--r--src/main.sh10
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