summaryrefslogtreecommitdiff
path: root/Master/common.sh
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-03 19:00:28 +0000
committerKarl Berry <karl@freefriends.org>2006-12-03 19:00:28 +0000
commitcad22e5a1cceb04cd561c7d2706c729ad7b88683 (patch)
tree22ebb9481ed4e557f64cc97456a5d285a5f43113 /Master/common.sh
parent42f6fcd0bc5b7949c33e0df47c53bb2d5eadd74e (diff)
(TEXMFCNF__fix_texmf, menu_directories): support changing TEXMFHOME;
from Maarten Sneep. (screen_1): display TEXMFHOME. (init): allow envvar overrides of all dirs. git-svn-id: svn://tug.org/texlive/trunk@2581 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/common.sh')
-rwxr-xr-xMaster/common.sh46
1 files changed, 34 insertions, 12 deletions
diff --git a/Master/common.sh b/Master/common.sh
index 932d985e081..ae5327694a0 100755
--- a/Master/common.sh
+++ b/Master/common.sh
@@ -335,7 +335,19 @@ TEXMFCNF__fix_texmf()
sed "s@^TEXMFSYSVAR.*@TEXMFSYSVAR=$VAR@" \
<.sed_tmp.$$ >$TEXMFCNF_DIR/texmf.cnf
rm .sed_tmp.$$
- #
+ #
+ # the TEXMFHOME tree
+ if test "x$HOME_CHANGE" = "x1"; then
+ # if the variable starts with the explicit home of the current user,
+ # replace that with the string '$HOME' as the explicit home of the
+ # current user is most certainly not what we want.
+ HME=`echo "$TEXMFHOME" | sed "s@$HOME/*@@" ` ;
+ TEXMFHOME="\$HOME/$HME"
+ fi
+ echo "Setting the user texmf home (TEXMFHOME) to \$HOME/$TEXMFHOME in $TEXMFCNF_DIR/texmf.cnf... " >&2
+ sed "s@^TEXMFHOME.*@TEXMFHOME=\$HOME/$TEXMFHOME@" $TEXMFCNF_DIR/texmf.cnf >.sed_tmp.$$
+ cp .sed_tmp.$$ $TEXMFCNF_DIR/texmf.cnf
+ rm .sed_tmp.$$
echo Done fixing texmf.cnf. >&2
}
@@ -661,18 +673,25 @@ menu_directories()
while true; do
cls
textvar_show screen_2; echo
- case `getopt 123RQ 'Enter command'` in
- 1) gets TEXDIR; TEXDIR=`dirname "$TEXDIR/x" | sed 's@//*@/@g'`
+ case `getopt 1234RQ 'Enter command'` in
+ 1) gets TEXDIR
+ LOCAL_CHANGE=2
+ TEXDIR=`dirname "$TEXDIR/x" | sed 's@//*@/@g'`
TEXMF=`echo $TEXDIR/texmf | sed 's@//*@/@g'`
TEXMFLOCAL=`echo $TEXDIR/texmf-local`
- LOCAL_CHANGE=2
TEXMFSYSVAR=`echo $TEXDIR/texmf-var`
;;
2) gets TEXMFLOCAL
- TEXMFLOCAL=`dirname "$TEXMFLOCAL/x" | sed 's@//*@/@g'`
LOCAL_CHANGE=1
+ TEXMFLOCAL=`dirname "$TEXMFLOCAL/x" | sed 's@//*@/@g'`
;;
- 3) gets TEXMFSYSVAR; VAR_CHANGE=1; TEXMFSYSVAR=`dirname "$TEXMFSYSVAR/x" | sed 's@//*@/@g'`;;
+ 3) gets TEXMFSYSVAR
+ VAR_CHANGE=1
+ TEXMFSYSVAR=`dirname "$TEXMFSYSVAR/x" | sed 's@//*@/@g'`
+ ;;
+ 4) gets TEXMFHOME
+ HOME_CHANGE=1
+ TEXMFHOME=`dirname "$TEXMFHOME/x" | sed 's@//*@/@g'` ;;
R) return;;
Q) exit_on_confirm;;
esac
@@ -779,8 +798,8 @@ screen_2='Current directories setup:
support tree: $TEXMF
<2> TEXMFLOCAL: $TEXMFLOCAL
-
<3> TEXMFSYSVAR: $TEXMFSYSVAR
+ <4> TEXMFHOME: $TEXMFHOME
Other options:
==============================================================================
@@ -976,11 +995,13 @@ init()
bindir=
tex_prefix=${TEXLIVE_INSTALL_PREFIX-/usr/local/texlive}
TEXDIR=${TEXLIVE_INSTALL_DIR-$tex_prefix/2006} # manually update each year!
- TEXMFSYSVAR=$TEXDIR/texmf-var
+ TEXMFSYSVAR=${TEXLIVE_INSTALL_TEXMFSYSVAR-$TEXDIR/texmf-var}
TEXMF=$TEXDIR/texmf
- TEXMFLOCAL=$tex_prefix/texmf-local
+ TEXMFLOCAL=${TEXLIVE_INSTALL_TEXMFLOCAL-$tex_prefix/texmf-local}
+ TEXMFHOME=${TEXLIVE_INSTALL_TEXMFHOME-'$HOME/texmf'}
VAR_CHANGE=""
LOCAL_CHANGE=""
+ HOME_CHANGE=""
screen_1=' ===================> TeX Live installation procedure <==================
@@ -995,9 +1016,10 @@ screen_1=' ===================> TeX Live installation procedure <===============
<C> standard collections <L> language collections]
$all_collections_ns out of $all_collections_anz, disk space required: $all_collections_dus kB
<D> directories:
- TEXDIR (main TeX directory) : $TEXDIR
- TEXMFSYSVAR (for sitewide config) : $TEXMFSYSVAR
- TEXMFLOCAL (for local styles etc.): $TEXMFLOCAL
+ TEXDIR (main TeX directory): $TEXDIR
+ TEXMFSYSVAR (systemwide config): $TEXMFSYSVAR
+ TEXMFLOCAL (systemwide styles etc.): $TEXMFLOCAL
+ TEXMFHOME (personal styles etc.): $TEXMFHOME
<O> options:
[$opt_varfonts] alternate directory for generated fonts ($opt_varfonts_dir)
[$opt_symlinks] create symlinks in standard directories