#! /bin/sh # $Id$ # Copyright 2008 Siep Kroonenberg. # You may freely use, modify and/or distribute this file. if test "x$1" = x--help; then cat </dev/null if test -e $TEXDIR/$testfile; then rm $TEXDIR/$testfile echo $TEXDIR is writable. TEXDIRW=$TEXDIR else echo $TEXDIR is not writable. TEXDIRW=$HOME/.tlportable2010 fi else TEXDIRW=$HOME/.tlportable2010 fi echo Using $TEXDIRW for generated files. platform=`$TEXDIR/install-tl --print-arch` if test "$platform" = ""; then echo 'Platform unsupported' exit 1 elif test ! -d $TEXDIR/bin/$platform; then echo 'Platform unsupported' exit 1 fi if test "$TEXDIR" = "$TEXDIRW"; then TEXMFCNF=$TEXDIRW else TEXMFCNF=$TEXDIRW/texmf-var/web2c export TEXMFCNF fi if test ! -r $TEXMFCNF/texmf.cnf; then TEXLIVE_INSTALL_PREFIX=$TEXDIRW export TEXLIVE_INSTALL_PREFIX if $TEXDIR/install-tl --portable --from_dvd --profile /dev/null; then :; else echo "$0: Initialization of TeX Live for portable use failed!" >&2 exit 1 fi unset TEXLIVE_INSTALL_PREFIX fi # Try to block initialization scripts. # Set custom prompt for secondary shell, but # I know of no good way to do this for the C shell. ENV=/dev/null export ENV PATH=$TEXDIR/bin/$platform:$PATH export PATH if test "$SHELL" = /bin/bash; then PS1='TL \w\$ ' export PS1 exec $SHELL --norc -i elif test "$SHELL" = /bin/zsh; then PS1='TL %d%% ' export PS1 exec $SHELL -f -i elif test "$SHELL" = /bin/csh; then exec $SHELL -f -i elif test "$SHELL" = /bin/tcsh; then exec $SHELL -f -i else PS1='TL $PWD\$ ' export PS1 exec $SHELL -f -i fi