Extended CLASSPATH. Check entries in CLASSPATH for existance before adding.

This commit is contained in:
hjp 1999-11-05 12:43:52 +00:00
parent 06f429e38d
commit 35a9fb6d61
1 changed files with 21 additions and 1 deletions

22
.zshenv
View File

@ -170,4 +170,24 @@ case "$FQDN" in
;;
esac
export CLASSPATH=.:/usr/local/java/classes:/usr/local/oracle/classes111.zip
ALL_PATH=.:/usr/local/java/classes:/usr/local/oracle/classes111.zip:/usr/java1.2/lib/tools.jar:/usr/local/jswdk-1.0.1/lib/servlet.jar
NEW_PATH=""
for i in ${(s/:/)ALL_PATH}
do
if test -r "$i"
then
case "$NEW_PATH" in
$i:*|*:$i|*:$i:*) ;;
*)
if test -z "$NEW_PATH"
then
NEW_PATH=$i
else
NEW_PATH=$NEW_PATH:$i
fi
esac
fi
done
export CLASSPATH=$NEW_PATH