summaryrefslogtreecommitdiff
path: root/Master/common.sh
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-03-19 22:01:56 +0000
committerKarl Berry <karl@freefriends.org>2007-03-19 22:01:56 +0000
commitb34cbb80c44908dce6dd4c80c47151b68ac3b746 (patch)
treefb09374b163f78c26df93d3989a2f7261a0e6aa9 /Master/common.sh
parent548ea7d9edc3ac71a41545185743d80961a5064f (diff)
don't execute the $HOME replacement if $HOME is /.
git-svn-id: svn://tug.org/texlive/trunk@4065 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/common.sh')
-rwxr-xr-xMaster/common.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/Master/common.sh b/Master/common.sh
index b30f6823d4d..c405060a3d9 100755
--- a/Master/common.sh
+++ b/Master/common.sh
@@ -346,10 +346,14 @@ TEXMFCNF__fix_texmf()
rm .sed_tmp.$$
#
# the TEXMFHOME tree
- if test "x$TEXMFHOME" != x'$HOME/texmf'; then
+ if test "x$TEXMFHOME" != x'$HOME/texmf' && test "x$HOME" != /; then
# if the variable starts with the explicit home of the current user
# (as in "/u/karl") replace that with the string '$HOME' as the
# explicit home of the current user is unlikely to ever be right.
+ #
+ # Furthermore, if the current user's HOME is / (ie, installing as
+ # root), we don't want to replace / with '$HOME'.
+ #
if echo "$TEXMFHOME" | grep "$HOME" >/dev/null; then
hme=`echo "$TEXMFHOME" | sed "s,$HOME/*,,"`
TEXMFHOME="\$HOME/$hme"