attached you find a patch to an extended version of the jelly script. for instance it does symlink replacement, so that you can link the jelly script conveniently in your local/bin directory. the script also fixes some bugs like the forehead.jar reference, which is forehead-$VERSION.jar not forehead.jar, etc.
Also the script tries to deduce the ANT_HOME location by checking where the ant script is located, and if it is a symbolic link it follows that.
If you find it useful, you could patch it against the current jelly shell script.
bye
--Jakob
Index: jelly
===================================================================
RCS file: /home/cvspublic/jakarta-commons/jelly/src/bin/jelly,v
retrieving revision 1.3
diff -u -r1.3 jelly
--- jelly 2 Jan 2003 17:32:41 -0000 1.3
+++ jelly 10 Aug 2003 12:29:10 -0000
@@ -1,10 +1,57 @@
#!/bin/sh
+
+function absolute_location( )
+{
+ script_location=$1
+ is_symlink=$( ls -l $script_location | grep "\->" )
+
+ while [ ! -z "$is_symlink" ]
+ do
+ #echo "$script_location is symlink"
+
+ script_location=$(ls -l $script_location | awk '{ print $10 }')
+ is_symlink=$( ls -l $script_location | grep "\->" )
+ done
+
+ echo "$script_location"
+
+}
+
+function get_home_from_bin( )
+{
+ bin_home=$(dirname $1)
+ __tmp_dir=$(pwd)
+ cd $bin_home/..
+ pwd
+ cd $__tmp_dir
+}
+
+if [ -z "$ANT_HOME" ] ; then
+
+ ant_location=$(which ant)
+ ant_location=$(absolute_location $ant_location)
+ ANT_HOME=$(get_home_from_bin $ant_location)
+fi
+
+if [ -z "$JELLY_HOME" ] ; then
+
+ jelly_location=$0
+ jelly_location=$(absolute_location $jelly_location)
+ JELLY_HOME=$(get_home_from_bin $jelly_location)
+
+fi
+
+echo using ant: $ANT_HOME
+echo using jelly: $JELLY_HOME
+
if [ -z "$FOREHEAD_CONF" ] ; then
FOREHEAD_CONF=${JELLY_HOME}/bin/forehead.conf
fi
-$JAVA_HOME/bin/java -classpath ${CLASSPATH}:${JELLY_HOME}/lib/forehead.jar \
+forehead_jar=$(echo ${JELLY_HOME}/lib/forehead*.jar)
+
+$JAVA_HOME/bin/java -classpath ${CLASSPATH}:$forehead_jar \
-Dforehead.conf.file=${FOREHEAD_CONF} \
-Dant.home=${ANT_HOME} -Djelly.home=${JELLY_HOME} \
-Dtools.jar=${JAVA_HOME}/lib/tools.jar \--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
