#!/bin/sh

if [ -f $HOME/.foprc ] ; then 
    . $HOME/.foprc
fi

FOP_HOME=@l_prefix@/share/fop
export FOP_HOME

LOCALCLASSPATH=""
for dir in @l_prefix@/lib/fop/*.jar; do
    if [ ".$LOCALCLASSPATH" = . ] ; then
        LOCALCLASSPATH=$dir
    else
        LOCALCLASSPATH="$dir:$LOCALCLASSPATH"
    fi
done

@l_prefix@/bin/java \
    -classpath "$LOCALCLASSPATH" \
    $FOP_OPTS \
    org.apache.fop.apps.Fop \
    ${1+"$@"}

