#!/bin/sh #+ # Name: # yafit # Purpose: # Invokes the YAFIT application on unix. # Requisistes: # - java should be on the path # - yafit.jar should be in the same directory as this script # Author: # MBT: Mark Taylor #- # Find where this script is located. bindir="`dirname $0`" jarfile=$bindir/yafit.jar if [ ! -f $jarfile ] then echo 1>&2 "No file $jarfile" exit 1 fi # Pull out any arguments which look to be destined for the java binary. javaArgs="" while test "$1" do if echo $1 | grep -- '^-[XD]' >/dev/null; then javaArgs="$javaArgs $1" shift elif echo $1 | grep -- '^-J' >/dev/null; then javaArgs="$javaArgs `echo $1 | sed s/^-J//`" shift elif [ "$1" = "-classpath" -a -n "$2" ]; then shift export CLASSPATH="$1" shift else break fi done # Execute the command. java $javaArgs -jar $jarfile "$@"