From: Marius Mauch Date: Wed, 19 Jul 2006 11:10:31 +0000 (-0000) Subject: use eval to allow shell expansion in config file X-Git-Tag: v2.1.1~191 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e48d4595bb2e9eabbff7cec90bbec3fc3ed419f0;p=portage.git use eval to allow shell expansion in config file svn path=/main/trunk/; revision=3935 --- diff --git a/bin/etc-update b/bin/etc-update index 5f237ee53..d0b7b7b18 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -20,8 +20,10 @@ function get_config() { # First strip off comment lines, then grab the configuration # item. If there's more than one of the same configuration item, # then allow the last setting to take precedence. - cut -d'#' -f1-1 /etc/etc-update.conf | \ - sed -ne "s/^ *$item *= *\([\"']\{0,1\}\)\(.*\)\1/\2/p" |sed -e '$p;d' + local result + result=$(cut -d'#' -f1-1 /etc/etc-update.conf | \ + sed -ne "s/^ *$item *= *\([\"']\{0,1\}\)\(.*\)\1/\2/p" |sed -e '$p;d') + eval echo $result } function scan() { @@ -399,9 +401,9 @@ trap die term eval $(/usr/lib/portage/bin/portageq envvar -v PORTAGE_TMPDIR CONFIG_PROTECT CONFIG_PROTECT_MASK) export PORTAGE_TMPDIR -echo $PORTAGE_TMPDIR -echo $CONFIG_PROTECT -echo $CONFIG_PROTECT_MASK +#echo $PORTAGE_TMPDIR +#echo $CONFIG_PROTECT +#echo $CONFIG_PROTECT_MASK #export PORTAGE_TMPDIR=$(/usr/lib/portage/bin/portageq envvar PORTAGE_TMPDIR) TMP="${PORTAGE_TMPDIR}/$$"