Hello,
the 'jython' script of jython 2.5.0 has a problem when installed on SuSE
Linux Enterprise 10.
The command 'expr' does not understand the 'up-arrow' (accent
circumflex). When using a relative path in a link to the script you will
get the following message:
expr: warning: unportable BRE: ;^/+: using `^' as the first character
of the basic regular expression is not portable; it is being ignored
To avoid this I modified the script. It uses now bash internal methods
to check for a leading slash. See the attached patch.
Regards,
Roland.
*** jython.orig Wed Jun 17 12:20:32 2009
--- jython Wed Jun 17 12:20:01 2009
***************
*** 6,11 ****
--- 6,23 ----
JAVA_HOME="/usr/java/jdk1.5.0_17/jre"
JYTHON_HOME_FALLBACK="/usr/local/jython2.5.0"
+ checkLeadingSlash()
+ {
+ declare -i RC
+ declare VALUE
+ declare CHECK
+ VALUE="$1"
+ CHECK=${VALUE#/}
+ [ $VALUE != $CHECK ]
+ RC=$?
+ return $RC
+ }
+
#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# jython.sh - start script for Jython (adapted from jruby.sh)
***************
*** 37,43 ****
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
! if expr "$link" : '^/' > /dev/null; then
PRG="$link"
else
PRG="`dirname ${PRG}`/${link}"
--- 49,55 ----
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
! if checkLeadingSlash "$link" ; then
PRG="$link"
else
PRG="`dirname ${PRG}`/${link}"
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects_______________________________________________
Jython-users mailing list
Jython-users@...
https://lists.sourceforge.net/lists/listinfo/jython-users