diff options
author | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2009-01-03 22:30:58 +0000 |
---|---|---|
committer | rhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58> | 2009-01-03 22:30:58 +0000 |
commit | 9ead1a8258e1f33d304a5c38cef40dbbec2a20dd (patch) | |
tree | d64ca202eb47f1a38e0432adb27c38a1a030a9d2 | |
parent | 12ecae94ad6930d9d36374c0175dfb9762acfb26 (diff) | |
download | simplepkg-9ead1a8258e1f33d304a5c38cef40dbbec2a20dd.tar.gz simplepkg-9ead1a8258e1f33d304a5c38cef40dbbec2a20dd.tar.bz2 |
attempting to fix #66
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@730 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r-- | trunk/lib/common.sh | 6 | ||||
-rwxr-xr-x | trunk/src/simplaret | 2 |
2 files changed, 4 insertions, 4 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 $* diff --git a/trunk/src/simplaret b/trunk/src/simplaret index 61ae7a4..4068242 100755 --- a/trunk/src/simplaret +++ b/trunk/src/simplaret @@ -196,7 +196,7 @@ function simplaret_repository { definition="$definition-$ARCH" fi - grep -e "^$definition=" $REPOS_CONF | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | cut -d "#" -f 1 + grep -e "^$definition=" $REPOS_CONF | tail -n 1 | cut -d = -f 2 | sed -e 's/"//g' -e "s/'//g" | cut -d "#" -f 1 } |