home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 March B
/
SCO_CASTOR4RRT.iso
/
jdk113
/
root
/
opt
/
jdk-1.1.3
/
bin
/
serialver
< prev
Wrap
Text File
|
1998-08-19
|
1KB
|
70 lines
#!/bin/sh
# @(#)serialver.sh 1.5 97/07/30
#
# Copyright (c) 1997 by Sun Microsystems, Inc.
# All rights reserved.
#
#
# Determine JAVA_HOME
#
if [ -z "$JAVA_HOME" ] ; then
if [ -d "/usr/java1.1" ] ; then
JAVA_HOME=/usr/java1.1
else
JAVA_HOME="`dirname \"$0\"`"
JAVA_HOME="`cd \"$JAVA_HOME\"/.. ; /bin/pwd`"
fi
fi
export JAVA_HOME
if [ ! -d "$JAVA_HOME" ] ; then
echo "Invalid JAVA_HOME: $JAVA_HOME" 1>&2
exit 1
fi
if [ -z "$CLASSPATH" ] ; then
CLASSPATH=".:${JAVA_HOME}/lib/classes.zip"
else
CLASSPATH="$CLASSPATH:${JAVA_HOME}/lib/classes.zip"
fi
export CLASSPATH
if [ ! -r "$JAVA_HOME/lib/classes.zip" ] ; then
if [ ! -d "$JAVA_HOME/classes" ] ; then
echo "Invalid JAVA_HOME: $JAVA_HOME" 1>&2
exit 1
fi
fi
if [ ! -r "$JAVA_HOME/lib/serialver.properties" ] ; then
echo "Could not read properties file: $JAVA_HOME/lib/serialver.properties" 1>&2
exit 1
fi
export LD_LIBRARY_PATH
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$JAVA_HOME/lib"
#
# Parse arguments
#
prog=java
jav= cav=
for a do
if ja=`expr "$a" : '-J\(..*\)'`
then jav="$jav $ja"
elif expr "$a" : '.*[\ \ ][\ \ ]*' 2>&- 1>&-
then cav="$cav \"$a\""
else cav="$cav $a"
fi; done
#
# Run the serial version UID utility
#
eval exec \"$JAVA_HOME\"/bin/$prog -ms8m $jav sun.tools.serialver.SerialVer $cav