#!/bin/sh
#
# SuSEFax-Wrapper, Copyright 1997 S.u.S.E. GmbH, Fuerth
# Author Carsten Hoeger, Carsten.Hoeger@suse.de
#
# This is a wrapper to start the Java Class SuSEFax
#

JAVA=java
PACKAGEROOT=/usr/lib
IMAGEPATH=-Dsusefax.images=$PACKAGEROOT/SuSEFax/images
JAVAOPTS=

if [ -z "$CLASSPATH" ]; then
    CLASSPATH=$PACKAGEROOT
else
    CLASSPATH=$CLASSPATH:$PACKAGEROOT
fi

export CLASSPATH

# Test, if the interpreter exists

which $JAVA >/dev/null 2>/dev/null || {
    cat<<EOF 

You have to install the package java to run this script or
you have to take care, that $JAVA exists...

EOF
    exit 0
}

# if you don't want to store the settings other than
# $HOME/.susefaxrc, then you may place another path and/or
# filename here

SETUPDIR=    # -Dsusefax.setup.path=/wo/auch/immer
SETUPFILE=   # -Dsusefax.setup.file=/was/auch/immer

# even the phonebook can be renamed to whatever

PHONEBOOK=   # -Dsusefax.phonebook.file=wieauchimmer

# lets call java

$JAVA $IMAGEPATH $SETUPDIR $SETUPFILE $PHONEBOOK \
    $JAVAOPTS SuSEFax.SuSEFax $*
