[tex-live] texdoc: complain_about_old_envvar

George N. White III gnwiii at gmail.com
Sun Aug 24 23:39:54 CEST 2008


On Sun, Aug 24, 2008 at 5:22 PM, Siep Kroonenberg <siepo at cybercomm.nl> wrote:

> On Sun, Aug 24, 2008 at 09:41:14PM +0200, Manuel Pégourié-Gonnard wrote:
>> Heiko Oberdiek scripsit (24.08.2008 19:06)
>> > Several TeX installations (including TL2007, TL2008, ...),
>> > it's better I do not describe all details, ... ;-)
>> >
>> If you don't mind I'd be interested in our favourite way of switching from one
>> version to another. I'm currently using symlinks and a special component in my
>> $PATH variable to do so, and if you have a better solution...
>
> A symlink can have only one value at a time, whereas different
> parallel sessions can have different values for environment
> variables, which can be handy if you need to hop back and forth
> between e.g. a testing environment and a production environment.
>
> I used to rely exclusively on environment variables, with scripts to
> switch between sets of values. But if you want to offer users
> something that `just works'(TM) then configuration with environment
> variables is not so hot.

The environment modules system has been around for ages.  It used
to come with SGI IRIX64, but since it was invented at Sun, it might
be available for Sun as well.  The sourceforge site has background
documents.  Someone has to write some module files (which are Tcl scripts),
but users just need to know a few commands:

module help
module avail
module list
module rm ..
module swap ...
module load ..

Here is a sample:

#%Module1.0#####################################################################
##
## TeX Live modulefile
##
proc ModulesHelp { } {
        global version modroot
        global arch modroot

        puts stderr "\tTeX/TL$version - loads the TeX Live software"
        puts stderr "\t & application environment."
        puts stderr "\n\tThis sets environment variables."
        puts stderr "\n\tVersion: $version"
        puts stderr "\tArchitecture: $arch \n"
}

conflict TeX

module-whatis	"loads the TeX Live environment"

# for Tcl script use only
set	version		2007
set     arch            i386-linux

prepend-path     PATH                    /usr/local/texlive/$version/bin/$arch
#
prepend-path     INFOPATH             /usr/local/texlive/$version/texmf/doc/info
setenv               TEXDOCVIEW_dvi   '(xdvi %s ) &'
setenv               TEXDOCVIEW_pdf   '(evince %s ) &'
setenv               TEXDOCVIEW_ps    '(evince %s ) &'
###################### end TeX/TL2008 modulefile

-- 
George N. White III <aa056 at chebucto.ns.ca>
Head of St. Margarets Bay, Nova Scotia


More information about the tex-live mailing list