77 lines
1.8 KiB
Bash
77 lines
1.8 KiB
Bash
#!/bin/sh
|
|
|
|
# Package: GeekTools Whois Java Client 1.0.1
|
|
# File: whois (Bourne shell script)
|
|
# Author: Erik C. Thauvin <erik@skytouch.com>
|
|
# Comments: Part of the GeekTools Whois Java Client package. See
|
|
# the README.TXT file for more information.
|
|
#
|
|
# Copyright (C) 2000-2001 SkyTouch Communications - All Rights Reserved
|
|
#
|
|
# This program is distributed under the terms of the GNU General
|
|
# Public License as published by the Free Software Foundation.
|
|
# See the COPYING.TXT file for more information.
|
|
|
|
args=""
|
|
for arg in "$@"
|
|
do
|
|
if [ "$arg" != "" ]
|
|
then
|
|
args="$args \"$arg\""
|
|
fi
|
|
done
|
|
|
|
if [ -e Whois.class ]
|
|
then
|
|
JAVA_EXE=/bin/java
|
|
if [ "$JAVA_PATH" = "" ]
|
|
then
|
|
# Linux JDK 1.3.0_01
|
|
JAVA_PATH=/usr/java/jdk1.3.0_01
|
|
if [ ! -x ${JAVA_PATH}${JAVA_EXE} ]
|
|
then
|
|
# Linux JDK 1.3
|
|
JAVA_PATH=/usr/java/jdk1.3
|
|
if [ ! -x ${JAVA_PATH}${JAVA_EXE} ]
|
|
then
|
|
# Linux JRE
|
|
JAVA_PATH=/usr/java/jre1.3
|
|
if [ ! -x ${JAVA_PATH}${JAVA_EXE} ]
|
|
then
|
|
# Solaris JDK
|
|
JAVA_PATH=/usr/j2se
|
|
if [ ! -x ${JAVA_PATH}${JAVA_EXE} ]
|
|
then
|
|
# Solaris JRE
|
|
JAVA_PATH=/usr/j2se/jre
|
|
if [ ! -x ${JAVA_PATH}${JAVA_EXE} ]
|
|
then
|
|
# Mac OS X
|
|
JAVA_PATH=
|
|
JAVA_EXE=/System/Library/Frameworks/JavaVM.framework/Versions/1.2/Commands/java
|
|
if [ ! -x ${JAVA_EXE} ]
|
|
then
|
|
JAVA_EXE=`which java`
|
|
if [ ! -x $JAVA_EXE ]
|
|
then
|
|
JAVA_EXE=java
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
fi
|
|
eval ${JAVA_PATH}${JAVA_EXE} Whois $args
|
|
if [ $? != 0 ]
|
|
then
|
|
echo "
|
|
Please make sure that the JDK or JRE bin directory is included
|
|
in your system PATH environment variable."
|
|
fi
|
|
else
|
|
echo "
|
|
The Whois.class could not be found. It must be located in the
|
|
same directory as the one this shell script was called from."
|
|
fi
|