diff options
Diffstat (limited to 'trunk/lib')
-rw-r--r-- | trunk/lib/common.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 2425ca8..d583a92 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -141,11 +141,11 @@ function eval_parameter { # return the evaluated parameter if available or $2 $3 ... $n if [ -e "$HOME_CONF" ] && grep -qe "^$1=" $HOME_CONF; then - grep -e "^$1=" $HOME_CONF | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//' + grep -e "^$1=" $HOME_CONF | tail -n 1 | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//' elif [ -e "$CONF" ] && grep -qe "^$1=" $CONF; then - grep -e "^$1=" $CONF | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//' + grep -e "^$1=" $CONF | tail -n 1 | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//' elif [ -e "$DEFAULT_CONF" ] && grep -qe "^$1=" $DEFAULT_CONF; then - grep -e "^$1=" $DEFAULT_CONF | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//' + grep -e "^$1=" $DEFAULT_CONF | tail -n 1 | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | sed -e 's/ *#.*$//' else shift echo $* |