From 1b2b62ccd8122c72944dab5fa5f7f6214b1f93f8 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 27 Sep 2010 05:14:34 -0700 Subject: Use config files, less arguments needed. --- lognotify.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lognotify.sh b/lognotify.sh index ba14cc3..161a50b 100755 --- a/lognotify.sh +++ b/lognotify.sh @@ -3,16 +3,16 @@ # Copyright 2010 David Vazgenovich Shakaryan # Distributed under the terms of the GNU General Public License v3 -if [ $# != 3 ]; then +CACHEDIR="${HOME}/.cache/lognotify" +CONFIGDIR="${HOME}/.config/lognotify" + +if [ $# != 1 ]; then echo "$0: incorrect number of arguments" >&2 exit 1 fi IDENTIFIER="$1" -SERVER="$2" -LOGPATH="$3" - -CACHEDIR="${HOME}/.cache/lognotify" +source "${CONFIGDIR}/${IDENTIFIER}" # Setup cache directory if nonexistent. if [ ! -d "${CACHEDIR}" ]; then -- cgit v1.2.3-70-g09d2