cvs commit: xml-fop fop.sh

2004-01-01 Thread pbwest
pbwest  2004/01/01 16:20:51

  Modified:.Tag: FOP_0-20-0_Alt-Design fop.sh
  Log:
  Removed set -x
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.2.2.3   +0 -2  xml-fop/fop.sh
  
  Index: fop.sh
  ===
  RCS file: /home/cvs/xml-fop/fop.sh,v
  retrieving revision 1.2.2.2
  retrieving revision 1.2.2.3
  diff -u -r1.2.2.2 -r1.2.2.3
  --- fop.sh28 Dec 2003 05:37:33 -  1.2.2.2
  +++ fop.sh2 Jan 2004 00:20:51 -   1.2.2.3
  @@ -2,8 +2,6 @@
   #
   # Shell script to run FOP, adapted from the Jakarta-Ant project.
   
  -set -x
  -
   if [ -f $HOME/.foprc ] ; then
 . $HOME/.foprc
   fi
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: xml-fop fop.sh

2003-12-27 Thread pbwest
pbwest  2003/12/27 21:37:33

  Added:   .Tag: FOP_0-20-0_Alt-Design fop.sh
  Log:
  Copied from HEAD
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.2.2.2   +105 -2xml-fop/fop.sh
  
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: xml-fop fop.sh

2001-08-31 Thread keiron

keiron  01/08/31 04:45:02

  Modified:.fop.sh
  Log:
  a better shell script to run fop with works
  from anywhere and sets the classpath in a better way.
  Submitted by: Weiqi Gao [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.4   +103 -4xml-fop/fop.sh
  
  Index: fop.sh
  ===
  RCS file: /home/cvs/xml-fop/fop.sh,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- fop.sh2001/08/20 21:11:02 1.3
  +++ fop.sh2001/08/31 11:45:02 1.4
  @@ -1,5 +1,104 @@
  -#!/bin/sh
  -LIBDIR=./lib
  
-LOCALCLASSPATH=$LIBDIR/../build/fop.jar:$LIBDIR/batik.jar:$LIBDIR/xalan-2.0.0.jar:$LIBDIR/xerces-1.2.3.jar:$LIBDIR/avalon-framework-4.0.jar:$LIBDIR/logkit-1.0b4.jar:$LIBDIR/jimi-1.0.jar
 
  -java -cp $CLASSPATH:$LOCALCLASSPATH org.apache.fop.apps.Fop $@
  +#! /bin/sh
  +#
  +# Shell script to run FOP, adapted from the Jakarta-Ant project.
  +
  +if [ -f $HOME/.foprc ] ; then 
  +  . $HOME/.foprc
  +fi
  +
  +# OS specific support.  $var _must_ be set to either true or false.
  +cygwin=false;
  +darwin=false;
  +case `uname` in
  +  CYGWIN*) cygwin=true ;;
  +  Darwin*) darwin=true ;;
  +esac
  +
  +if [ -z $FOP_HOME ] ; then
  +  # try to find FOP
  +  if [ -d /opt/fop ] ; then 
  +FOP_HOME=/opt/fop
  +  fi
  +
  +  if [ -d ${HOME}/opt/fop ] ; then 
  +FOP_HOME=${HOME}/opt/fop
  +  fi
  +
  +  ## resolve links - $0 may be a link to fop's home
  +  PRG=$0
  +  progname=`basename $0`
  +  
  +  while [ -h $PRG ] ; do
  +ls=`ls -ld $PRG`
  +link=`expr $ls : '.*- \(.*\)$'`
  +if expr $link : '.*/.*'  /dev/null; then
  + PRG=$link
  +else
  + PRG=`dirname $PRG`/$link
  +fi
  +  done
  +  
  +  FOP_HOME=`dirname $PRG`
  +
  +fi
  +
  +# For Cygwin, ensure paths are in UNIX format before anything is touched
  +if $cygwin ; then
  +  [ -n $FOP_HOME ] 
  +FOP_HOME=`cygpath --unix $FOP_HOME`
  +  [ -n $JAVA_HOME ] 
  +JAVA_HOME=`cygpath --unix $JAVA_HOME`
  +  [ -n $CLASSPATH ] 
  +CLASSPATH=`cygpath --path --unix $CLASSPATH`
  +fi
  +
  +if [ -z $JAVACMD ] ; then 
  +  if [ -n $JAVA_HOME  ] ; then
  +if [ -x $JAVA_HOME/jre/sh/java ] ; then 
  +  # IBM's JDK on AIX uses strange locations for the executables
  +  JAVACMD=$JAVA_HOME/jre/sh/java
  +else
  +  JAVACMD=$JAVA_HOME/bin/java
  +fi
  +  else
  +JAVACMD=java
  +  fi
  +fi
  + 
  +if [ ! -x $JAVACMD ] ; then
  +  echo Error: JAVA_HOME is not defined correctly.
  +  echo   We cannot execute $JAVACMD
  +  exit
  +fi
  +
  +if [ -n $CLASSPATH ] ; then
  +  LOCALCLASSPATH=$CLASSPATH
  +fi
  +
  +# add fop.jar, which resides in $FOP_HOME/build
  +LOCALCLASSPATH=${FOP_HOME}/build/fop.jar:$LOCALCLASSPATH
  +
  +# add in the dependency .jar files, which reside in $FOP_HOME/lib
  +DIRLIBS=${FOP_HOME}/lib/*.jar
  +for i in ${DIRLIBS}
  +do
  +# if the directory is empty, then it will return the input string
  +# this is stupid, so case for it
  +if [ $i != ${DIRLIBS} ] ; then
  +  if [ -z $LOCALCLASSPATH ] ; then
  +LOCALCLASSPATH=$i
  +  else
  +LOCALCLASSPATH=$i:$LOCALCLASSPATH
  +  fi
  +fi
  +done
  +
  +# For Cygwin, switch paths to Windows format before running java
  +if $cygwin; then
  +  FOP_HOME=`cygpath --path --windows $FOP_HOME`
  +  JAVA_HOME=`cygpath --path --windows $JAVA_HOME`
  +  LOCALCLASSPATH=`cygpath --path --windows $LOCALCLASSPATH`
  +fi
  +
  +$JAVACMD -classpath $LOCALCLASSPATH $FOP_OPTS org.apache.fop.apps.Fop $@
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]