aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2012-09-15 20:10:31 +0200
committerUlrich Müller <ulm@gentoo.org>2012-09-15 20:10:31 +0200
commit78b5fb759016a0b3b0da96137f633c89154d94d6 (patch)
tree09aa0e54e22ef291873ea40610f7426772e6ea85 /bin
parentFix typo in ChangeLog: slash, not backslash. (diff)
downloadeselect-78b5fb759016a0b3b0da96137f633c89154d94d6.tar.gz
eselect-78b5fb759016a0b3b0da96137f633c89154d94d6.tar.bz2
eselect-78b5fb759016a0b3b0da96137f633c89154d94d6.zip
Remove trailing slash from ROOT only if EPREFIX is set.
* bin/eselect.in (EROOT): Remove trailing slash from ROOT only if EPREFIX is set. This guarantees that EROOT is equal to ROOT for empty EPREFIX.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/eselect.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/eselect.in b/bin/eselect.in
index fb1260f..95bc77e 100755
--- a/bin/eselect.in
+++ b/bin/eselect.in
@@ -43,7 +43,7 @@ ESELECT_KILL_TARGET="$$"
# Support variables for Gentoo Prefix
EPREFIX="@EPREFIX@"
-EROOT="${ROOT%/}${EPREFIX}"
+EROOT="${ROOT%${EPREFIX:+/}}${EPREFIX}"
# Remove all alias definitions. Unset functions and variables that are
# known to cause trouble.