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
# handle opts
opts_spec=":dhvr:"
opts_spec=":dhv:r:i:"
opt_docs=false
opt_verbose=false
usage () {
echo "Usage: $0 [-d] [-h] [-v] [-r]"
echo "Usage: $0 [-d] [-h] [-v] [-r repoter] [-i interval]"
}
help () {
@ -37,6 +37,9 @@ while getopts "$opts_spec" opt; do
r)
REPORTER=$OPTARG
;;
i)
INTERVAL=$OPTARG
;;
*)
usage
exit 1

View File

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