From 35a9fb6d61f0b0fe3a03d1ef0ec193a76cb57e17 Mon Sep 17 00:00:00 2001 From: hjp Date: Fri, 5 Nov 1999 12:43:52 +0000 Subject: [PATCH] Extended CLASSPATH. Check entries in CLASSPATH for existance before adding. --- .zshenv | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.zshenv b/.zshenv index 2c15dd5..d4a3f39 100644 --- a/.zshenv +++ b/.zshenv @@ -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