From 9ead1a8258e1f33d304a5c38cef40dbbec2a20dd Mon Sep 17 00:00:00 2001 From: rhatto Date: Sat, 3 Jan 2009 22:30:58 +0000 Subject: attempting to fix #66 git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@730 04377dda-e619-0410-9926-eae83683ac58 --- trunk/lib/common.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'trunk/lib/common.sh') 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 $* -- cgit v1.2.3