			Enabling Software
			~~~~~~~~~~~~~~~~~
	       Copyright (c) 1996 Hubert Feyrer


1. Introduction
~~~~~~~~~~~~~~~
Sometimes, it's not enough to make a program and its files available in a
public direcory (/usr/local/bin, ...). There are packages which require
each user to set certain environment variables, extend their search paths,
etc. In order to make this process esp. for novice users more easy, a
concept for 'enabling' optional software packages is introduced here.

The basic idea here is to keep a file that does all the work for the user,
and which then updates the user's environment on demand.

To modify a shell-environment, the script depends on the shell, and the
concept here focuses on two shells, ths Bourne shell and compatibles
(/bin/sh, bash) and the C shell and derivates (/bin/csh, tcsh). It
shouldn't be too difficult to include further shells, should they become
widely available.


2. User-Setup
~~~~~~~~~~~~~

2.1 C Shell
~~~~~~~~~~~
To use concept, every C shell user has to have the following alias in his
.cshrc or so:

	alias en 'source /usr/local/\!*/install/en_\!*.csh'


2.2 Bourne Shell
~~~~~~~~~~~~~~~~
Bourne shell users have to include the following shell function into their
.profile:

	en(){
		. /usr/local/$1/install/en_$1.sh
	}

Please note that writing the sh-function can be done in one line, but
this would break at least in bash:

	en() . /usr/local/$1/install/en_$1.sh


2.3 Usage
~~~~~~~~~
After setting up his shell alias/function for 'en' correctly, a list of
available packages (that can be enabled) is available by simply invoking
'en':

	Optional packages can be enabled by using "en xxx",
	where xxx can be one of:
 	 TeX


3.0 Enabling own packages
~~~~~~~~~~~~~~~~~~~~~~~~~
The enabling-mechanism introduced here is intended to be used with the
EasyInstall package, which puts a certain Package $pkg in a common base
directory $BASE (e.g. /usr/local), and creates a subdirectory 'install'
there:
	
	$BASE/$pkg/install

Now simply place a Bourne-shell script named 'en_$pkg.sh' and/or a C-shell
script named 'en_$pkg.csh' in that directory for the shell alias/function
to find that file.

As said above, the scripts should set search path, MANPATH, library paths
(LD_LIBRARY_PATH), and other environment variables specific to the
package. It's also recommended that the csh-script does a 'rehash' after
altering the search path.


=============== Hubert Feyrer ============================================
      Weekdays: Rennerstr. 19, D-93053 Regensburg,  Tel. 0941/943-2905
      Weekends: Bachstr. 40,   D-84066 Mallersdorf, Tel. 08772/6084
      Internet: hubert.feyrer@rz.uni-regensburg.de == IRC: hubertf
==========================================================================
