summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-10-28 13:17:53 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-10-28 13:17:53 (EDT)
commit411048976915c498ff4477ff2ffb7eaa1029affd (patch)
treed31452e977b2b0a05962ef2e3515eb01d7903a98
parent7fdea8cfe80bd29316b530d5ea211930a9036744 (diff)
downloadfirman.sh-411048976915c498ff4477ff2ffb7eaa1029affd.zip
firman.sh-411048976915c498ff4477ff2ffb7eaa1029affd.tar.gz
firman.sh-411048976915c498ff4477ff2ffb7eaa1029affd.tar.bz2
src/main.sh: Add -o option
-rw-r--r--src/main.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.sh b/src/main.sh
index 6c31959..c4b7491 100644
--- a/src/main.sh
+++ b/src/main.sh
@@ -31,6 +31,7 @@ Options:
-V Display version information
-i {cli|tui} Select either a textual user interface or a command line
interface (default: cli)
+ -o <file> Log output to <file>
EOF
}
@@ -51,7 +52,7 @@ main()
local ui='cli'
unset OPTARG
- while getopts 'hVi:' opt; do
+ while getopts 'hVi:o:' opt; do
case "${opt}" in
'h')
help
@@ -64,6 +65,9 @@ main()
'i')
ui="${OPTARG}"
;;
+ 'o')
+ log_init "${OPTARG}"
+ ;;
esac
unset OPTARG
done