Wei Chen <[EMAIL PROTECTED]> writes: > We now have system level `update-alternatives' mechanism that can be > used by root to maintain symbol links in `/etc/alternatives'. Is it > useful/interesting to extend its use to user level, i.e. to maintain > similar symbol links in `~/bin' or something like > `~/bin/alternatives'? Or does that already exist? I personally think > it can be useful, because I currently do that manually.
The way the did it at computer lab at my school, was to create a bunch of scripts that you had to call to get the version of program you wanted. Say, you wanted java-1.5. It is probably contained inside /usr/lib/jvm/java-1.5.0-sun. Create a script that sets the PATH to include the bin directory. Something like this: JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun JDKDIR=$JAVA_HOME PATH=$JAVA_HOME/bin:$PATH CLASSPATH=$JAVA_HOME:`dirname $JAVA_HOME`/jdbc/classes12.zip:. MANPATH=$MANPATH:$JDKDIR/man export JAVA_HOME JDKDIR PATH CLASSPATH Now, this path will before the one /usr/bin, so it will be searched first. You can put this script in your .bashrc. If you have sun java 6 installed, or gcj or whatever, you could just do something similar as long as they reside in their own directory structure. For compilers, you could export CC and CXX and only use those variables in your makefile, I guess. -- John L. Fjellstad web: http://www.fjellstad.org/ Quis custodiet ipsos custodes -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]