properly handle relative and absolute path names in jvm paths

git-svn-id: svn://10.0.0.236/trunk@98409 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blizzard%redhat.com 2001-07-01 19:38:53 +00:00
parent d9e5951e98
commit db7071c289

View File

@ -90,6 +90,15 @@ set_jvm_vars() {
fi
JVM_LINK=`readlink /usr/lib/mozilla/plugins/libjavaplugin_oji.so`
# is it relative? if so append the full path
echo "${JVM_LINK}" | grep -e "^/"
if [ "$?" -ne "0" ]; then
JVM_LINK=/usr/lib/mozilla/plugins/${JVM_LINK}
fi
JVM_BASE=`basename $JVM_LINK`
JVM_DIR=`echo $JVM_LINK | sed -e s/$JVM_BASE//g`
JVM_DIR=${JVM_DIR}../../../bin/