From: Paul Varner Date: Wed, 11 Apr 2012 18:50:29 +0000 (-0500) Subject: Fix eread to work on a prefix environment. X-Git-Tag: gentoolkit-0.3.0.6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fb98d301841a6213e69e98a5de08d651f6391e30;p=gentoolkit.git Fix eread to work on a prefix environment. --- diff --git a/bin/eread b/bin/eread index c6d4de1..7d0a970 100755 --- a/bin/eread +++ b/bin/eread @@ -6,13 +6,16 @@ # Author: Donnie Berkholz # Updated by: Uwe Klosa +# Get prefix +EPREFIX=${EPREFIX:-$(portageq envvar EPREFIX)} + # set decent PATH for bug 172969 -PATH=/usr/bin:/bin:${PATH} +PATH=${EPREFIX}/usr/bin:${EPREFIX}/bin:${PATH} # Set ELOGDIR PORT_LOGDIR="$(portageq envvar PORT_LOGDIR)" -[ "$PORT_LOGDIR" = "" ] && PORT_LOGDIR="/var/log/portage" +[ "$PORT_LOGDIR" = "" ] && PORT_LOGDIR="${EPREFIX}/var/log/portage" ELOGDIR="$PORT_LOGDIR/elog" # Verify that ELOGDIR exists