#!/bin/sh

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

FOP_HOME=@l_prefix@/etc/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 -Vsun-jdk \
    -classpath "$LOCALCLASSPATH" \
    -Djava.awt.headless=true \
    $FOP_OPTS \
    org.apache.fop.cli.Main \
    ${1+"$@"}

