fix cli options

This commit is contained in:
Patrick Stadler 2015-03-14 14:59:17 +01:00
parent cab1ad7d0a
commit e97e43c90e
2 changed files with 6 additions and 3 deletions

View File

@ -10,12 +10,12 @@ LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8 LANGUAGE=en_US.UTF-8
# handle opts # handle opts
opts_spec=":dhvr:" opts_spec=":dhv:r:i:"
opt_docs=false opt_docs=false
opt_verbose=false opt_verbose=false
usage () { usage () {
echo "Usage: $0 [-d] [-h] [-v] [-r]" echo "Usage: $0 [-d] [-h] [-v] [-r repoter] [-i interval]"
} }
help () { help () {
@ -37,6 +37,9 @@ while getopts "$opts_spec" opt; do
r) r)
REPORTER=$OPTARG REPORTER=$OPTARG
;; ;;
i)
INTERVAL=$OPTARG
;;
*) *)
usage usage
exit 1 exit 1

View File

@ -3,7 +3,7 @@
init () { init () {
if [ -z $FILE_LOCATION ]; then if [ -z $FILE_LOCATION ]; then
echo "Missing configuration: \$FILE_LOCATION" echo "Missing configuration: \$FILE_LOCATION"
return 1 exit 1
fi fi
if [ ! -f $FILE_LOCATION ]; then if [ ! -f $FILE_LOCATION ]; then