packages: java-xmlgraphics-fop/fop.sh - by default use config from /var/lib...
pawelz
pawelz at pld-linux.org
Sun Apr 4 21:57:56 CEST 2010
Author: pawelz Date: Sun Apr 4 19:57:56 2010 GMT
Module: packages Tag: HEAD
---- Log message:
- by default use config from /var/lib/fop
- don't override FOP_CONFIG env if one specified
- don't override -c cmdline option if one specified
---- Files affected:
packages/java-xmlgraphics-fop:
fop.sh (1.8 -> 1.9)
---- Diffs:
================================================================
Index: packages/java-xmlgraphics-fop/fop.sh
diff -u packages/java-xmlgraphics-fop/fop.sh:1.8 packages/java-xmlgraphics-fop/fop.sh:1.9
--- packages/java-xmlgraphics-fop/fop.sh:1.8 Sat Apr 3 23:24:42 2010
+++ packages/java-xmlgraphics-fop/fop.sh Sun Apr 4 21:57:50 2010
@@ -1,9 +1,16 @@
#!/bin/sh -e
-FONTDIR=/usr/share/fonts
-FOP_CONF=$FONTDIR/fop-font.config
+FOPDIR=/var/lib/fop
+FOP_CONF=${FOP_CONF:-"$FOPDIR/fop-font.config"}
jars="xmlgraphics-fop avalon-framework-api avalon-framework-impl commons-io xalan xerces-j2 xmlgraphics-batik xmlgraphics-batik/batik-util"
CLASSPATH=$(build-classpath $jars)
-exec java -classpath $CLASSPATH org.apache.fop.cli.Main -c $FOP_CONF $@
+# If user specified -c option, and it is not the last option (i.e. it has
+# an argument), don't override it.
+case " $*" in
+ *' -c '*) FOP_CONFIG_OPTION="" ;;
+ *) FOP_CONFIG_OPTION="-c $FOP_CONFIG" ;;
+esac
+
+exec java -classpath $CLASSPATH org.apache.fop.cli.Main $CONFIG $@
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/java-xmlgraphics-fop/fop.sh?r1=1.8&r2=1.9&f=u
More information about the pld-cvs-commit
mailing list