2011-05-17 13:45:07 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Source functions library
|
|
|
|
if [ -f /usr/share/java-utils/java-functions ] ; then
|
|
|
|
. /usr/share/java-utils/java-functions
|
|
|
|
else
|
|
|
|
echo "Can't find functions library, aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
# Load system-wide configuration
|
|
|
|
if [ -f /etc/fop.conf ]; then
|
|
|
|
. /etc/fop.conf
|
|
|
|
fi
|
2012-12-10 08:18:55 +01:00
|
|
|
fopxconf=/etc/fop.xconf
|
|
|
|
fop_exec_args=
|
|
|
|
if [ -f "$fopxconf" ] ; then
|
|
|
|
config_found=0
|
|
|
|
for i in "$@"; do if [ "$i" = "-c" ]; then config_found=1; break; fi; done
|
|
|
|
if [ $config_found = 0 ]; then
|
|
|
|
fop_exec_args="-c $fopxconf $fop_exec_args"
|
|
|
|
fi
|
|
|
|
fi
|
2011-05-17 13:45:07 +02:00
|
|
|
|
|
|
|
# Load user configuration
|
|
|
|
if [ -f "$HOME/.foprc" ]; then
|
|
|
|
. "$HOME/.foprc"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Rest of the configuration
|
|
|
|
MAIN_CLASS=org.apache.fop.tools.fontlist.FontListMain
|
|
|
|
|
2020-06-03 19:06:14 +02:00
|
|
|
BASE_JARS="xmlgraphics-fop xmlgraphics-commons batik-all xerces-j2 xalan-j2 xalan-j2-serializer commons-logging commons-io"
|
2011-05-17 13:45:07 +02:00
|
|
|
|
|
|
|
# Set parameters
|
|
|
|
set_jvm
|
|
|
|
set_classpath $BASE_JARS
|
|
|
|
set_flags $BASE_FLAGS
|
|
|
|
set_options $BASE_OPTIONS $FOP_OPTS
|
|
|
|
|
|
|
|
# Let's start
|
2012-12-10 08:18:55 +01:00
|
|
|
run $fop_exec_args "$@"
|