Check if apppath is available before trying to use it.

This commit is contained in:
hjp 2005-05-23 09:12:18 +00:00
parent ab1b1399da
commit e8b57a53b8
1 changed files with 67 additions and 59 deletions

8
.zjava
View File

@ -1,3 +1,10 @@
# setup java environment.
#
# This file uses apppath. Since it would clobber the PATH variable if apppath
# isn't in the path, we just skip everything in this case.
if whence apppath > /dev/null
then
for i in /usr/java/j2sdk1.4.2_03 /usr/local/j2sdk1.4.2 /usr/local/j2sdk1.4.1 /usr/java/j2sdk1.4.0 \ for i in /usr/java/j2sdk1.4.2_03 /usr/local/j2sdk1.4.2 /usr/local/j2sdk1.4.1 /usr/java/j2sdk1.4.0 \
/usr/java/jdk1.3.1_02 /usr/java/jre1.3.1_02 \ /usr/java/jdk1.3.1_02 /usr/java/jre1.3.1_02 \
/usr/local/jdk1.2.2 /usr/java1.2 /usr/local/jdk1.2 \ /usr/local/jdk1.2.2 /usr/java1.2 /usr/local/jdk1.2 \
@ -64,3 +71,4 @@ do
break; break;
fi fi
done done
fi