From 8c1ba902154aee09b1c240d5a7a541dcafb46e6c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 27 Mar 2012 07:39:57 -0700 Subject: emerge-webrsync: use portageq from same prefix --- bin/emerge-webrsync | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin/emerge-webrsync') diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index e6749f285..bfd9aa2fc 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -27,11 +27,19 @@ wecho() { echo "${argv0}: warning: $*" 1>&2 ; } eecho() { echo "${argv0}: error: $*" 1>&2 ; } argv0=$0 -if ! type -P portageq > /dev/null ; then + +# Use portageq from the same directory/prefix as the current script, so +# that we don't have to rely on PATH including the current EPREFIX. +scriptpath=${BASH_SOURCE[0]} +if [ -x "${scriptpath%/*}/portageq" ]; then + portageq=${scriptpath%/*}/portageq +elif type -P portageq > /dev/null ; then + portageq=portageq +else eecho "could not find 'portageq'; aborting" exit 1 fi -eval $(portageq envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \ +eval $("${portageq}" envvar -v FEATURES FETCHCOMMAND GENTOO_MIRRORS \ PORTAGE_BIN_PATH PORTAGE_GPG_DIR \ PORTAGE_NICENESS PORTAGE_RSYNC_EXTRA_OPTS PORTAGE_TMPDIR PORTDIR \ SYNC http_proxy ftp_proxy) -- cgit v1.2.3-1-g7c22