diff options
-rwxr-xr-x | Master/common.sh | 46 |
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 |