IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34961


Ignore:
Timestamp:
Jan 18, 2013, 5:57:47 AM (14 years ago)
Author:
eugene
Message:

ippjython gets the paths correctly setup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/ippjython.sh

    r34937 r34961  
    11#!/bin/csh -f
    22
    3 # XXX EAM 2012.06.29 : this needs to be cleaned up: java should point at an installation directory configured by the build system on installation
     3# set JAVA = ~ipp/jre1.7.0_03/bin/java
     4# set JYTHON = ~ipp/jython2.5.3b1/jython.jar
    45
    5 set JAVA = ~ipp/jre1.7.0_03/bin/java
    6 set JYTHON = ~ipp/jython2.5.3b1/jython.jar
     6# a bit crude : get the datadir path by interpollation of the PATH element for psconfig
     7foreach f ( `echo $PATH | tr : ' '` )
     8  echo $f | grep $PSCONFDIR > /dev/null
     9  if ($status) continue
     10  set datadir = `echo $f | sed s/bin\$/share/`
     11  break
     12end
    713
    8 set CLASSPATH = ../jars:../jars/stilts.jar:../jars/commonst-math-2-2.jar:../jars/mysql-connector-java-5.1.14-bin.jar
     14set JARDIR = $datadir/jar
     15set JYDIR = $datadir/jython
    916
    10 $JAVA -Xbootclasspath/a:$CLASSPATH -jar $JYTHON $*
     17# XXX install jython in JARDIR
     18# set JYTHON = $JARDIR/jython2.5.3b1/jython.jar
     19set JYTHON = ~/jython2.5.3b1/jython.jar
     20
     21if (! -r $JYTHON) then
     22  echo "jython jar file not found, check jython installation"
     23  exit 2
     24endif
     25
     26if ($?JAVA == 0) then
     27  which java >& /dev/null
     28  if ($status) then
     29    echo "java not found, please specify location in environment or install in path"
     30    exit 2
     31  endif
     32  set JAVA = `which java`
     33endif
     34
     35set CLASSPATH = $JARDIR/stilts.jar\:$JARDIR/commonst-math-2-2.jar\:$JARDIR/mysql-connector-java-5.1.14-bin.jar\:$JYDIR
     36
     37if ($#argv < 1) then
     38  echo "USAGE ippjython.sh (classfile) [options]"
     39  exit 2
     40endif
     41
     42set classfile = $1
     43shift
     44
     45$JAVA -Xbootclasspath/a:$CLASSPATH -jar $JYTHON $JYDIR/$classfile $*
Note: See TracChangeset for help on using the changeset viewer.