#!/usr/bin/bash ## Save the current PATH only once in OLD_PATH_VAR and use OLD_PATH_VAR ## instead of PATH for the first PATH extension. If you extend the PATH ## environment variable _after_ you have executed setvars, the next ## "setvars" invocation will overwrite these additions with OLD_PATH_VAR. ## Similar remarks with respect to CLASSPATH. Saving PATH and CLASSPATH ## the first time allows you to invoke "setvars" several times without ## leaving the current shell : if [ -z "$OLD_PATH_VAR" ] then OLD_PATH_VAR=$PATH export OLD_PATH_VAR fi if [ -z "$OLD_CLASSPATH_VAR" ] then OLD_CLASSPATH_VAR=$CLASSPATH export OLD_CLASSPATH_VAR fi ## environment variable examples : ## DLP_ROOT=/dlp1r18N : DLP_ROOT=/home/USER/dlp/dlp1r18N DLP_JARS=c:\\cygwin\\home\\USER\\dlp\\dlp1r18N export DLP_ROOT ## unix style export DLP_JARS ## cygwin style ## dlp, dlpc commands : PATH=$DLP_ROOT/bin:$OLD_PATH_VAR # first PATH ## remove the next "jikes" lines in case you prefer ## SUN's javac compiler for compiling Java programs : ## Jikes executable in directory : JIKES_EXEC=/usr/local/bin ## or $JIKES_ROOT/bin ## used by dlpc : export JIKES_EXEC PATH=$JIKES_EXEC:$PATH ## location of SWI-Prolog: SWI_EXEC=/usr/local/bin ## used by dlpc: export SWI_EXEC PATH=$SWI_EXEC:$PATH ## where to find java, javac, etc. : JAVA_ROOT=/cygdrive/c/jdk1.3.0_02 ## unix style JAVA_JARS=c:\\jdk1.3.0_02 ## cygwin style export JAVA_ROOT export JAVA_JARS PATH=$JAVA_ROOT/bin:$PATH export PATH ## next 3 lines are only required for special purpose Java ## interpreters (or "oldjava") that use the Java 1.2.2 ## libraries and jikes : CLASSPATH=$JAVA_JARS\\src.jar\;$OLD_CLASSPATH_VAR # first CLASSPATH CLASSPATH=$JAVA_JARS\\jre\\lib\\i18n.jar\;$CLASSPATH CLASSPATH=$JAVA_JARS\\jre\\lib\\rt.jar\;$CLASSPATH ## (Precompiled) DLP + examples class files: CLASSPATH=$DLP_JARS\\classes\;$CLASSPATH CLASSPATH=$DLP_JARS\\classes\\dlpsys.jar\;$CLASSPATH CLASSPATH=$DLP_JARS\\examples\\classes\;$CLASSPATH ## In case you would like to write and compile DLP programs in ## directory MY_PROG_DIR, remove the # comment character ## and adjust the following line : # CLASSPATH=MY_PROG_DIR\\classes\;$CLASSPATH export CLASSPATH # classes for jikes: JIKESPATH=$CLASSPATH export JIKESPATH