summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Mauch <genone@gentoo.org>2006-07-19 11:10:31 +0000
committerMarius Mauch <genone@gentoo.org>2006-07-19 11:10:31 +0000
commite48d4595bb2e9eabbff7cec90bbec3fc3ed419f0 (patch)
tree0da1fc87a3f15a0861d664fb07e78e8e4e264ed6 /bin/etc-update
parentOnly call portageq once (diff)
downloadportage-multirepo-e48d4595bb2e9eabbff7cec90bbec3fc3ed419f0.tar.gz
portage-multirepo-e48d4595bb2e9eabbff7cec90bbec3fc3ed419f0.tar.bz2
portage-multirepo-e48d4595bb2e9eabbff7cec90bbec3fc3ed419f0.zip
use eval to allow shell expansion in config file
svn path=/main/trunk/; revision=3935
Diffstat (limited to 'bin/etc-update')
-rwxr-xr-xbin/etc-update12
1 files changed, 7 insertions, 5 deletions
diff --git a/bin/etc-update b/bin/etc-update
index 5f237ee5..d0b7b7b1 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}/$$"