From 69150409a534e24107cccc080c5650bbd12bcc8e Mon Sep 17 00:00:00 2001 From: James Le Cuirot Date: Sun, 26 Feb 2023 23:14:02 +0000 Subject: Allow EPREFIX to be overridden for manipulating prefixed ROOT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * bin/eselect.in: Allow EPREFIX to be overridden for manipulating prefixed ROOT. Signed-off-by: James Le Cuirot Signed-off-by: Ulrich Müller --- bin/eselect.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/eselect.in b/bin/eselect.in index 4caa87e..6a0fdbc 100755 --- a/bin/eselect.in +++ b/bin/eselect.in @@ -41,8 +41,11 @@ ESELECT_VERSION="@VERSION@" ESELECT_BINARY_NAME="$0" ESELECT_KILL_TARGET="$$" -# Support variables for Gentoo Prefix -EPREFIX="@EPREFIX@" +# Support variables for Gentoo Prefix. BROOT is hardcoded as the +# prefix for the build host. EPREFIX defaults to the same, but can be +# overridden at runtime when building for a different prefix. +BROOT="@EPREFIX@" +: ${EPREFIX="${BROOT}"} EROOT="${ROOT%${EPREFIX:+/}}${EPREFIX}" # Remove all alias definitions. Unset functions and variables that are -- cgit v1.2.3-65-gdbad