diff -u -r bin/classpath.sh /bin/classpath.sh --- bin/classpath.sh 2010-11-22 09:32:10.000000000 +0100 +++ /bin/classpath.sh 2010-11-28 16:18:13.000000000 +0100 @@ -7,8 +7,21 @@ ### $Id: classpath.sh 82920 2009-01-15 17:29:45Z pgier $ ### -DIRNAME=`dirname $0` -PROGNAME=`basename $0` +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` + CAT="cat" # diff -u -r bin/password_tool.sh /bin/password_tool.sh --- bin/password_tool.sh 2010-11-22 09:32:10.000000000 +0100 +++ /bin/password_tool.sh 2010-11-28 16:12:57.000000000 +0100 @@ -4,8 +4,20 @@ # ################################ -DIRNAME=`dirname $0` -PROGNAME=`basename $0` +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` # OS specific support (must be 'true' or 'false'). cygwin=false; diff -u -r bin/probe.sh /bin/probe.sh --- bin/probe.sh 2010-11-22 09:32:10.000000000 +0100 +++ /bin/probe.sh 2010-11-28 16:14:39.000000000 +0100 @@ -8,7 +8,23 @@ # Discovers all UDP-based members running on a certain mcast address (use -help for help) # Probe [-help] [-addr ] [-port ] [-ttl ] [-timeout ] -CLASSPATH=.:../lib/commons-logging.jar:../server/all/lib/jgroups.jar:$CLASSPATH +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` + + +CLASSPATH=.:$DIRNAME/../lib/commons-logging.jar:$DIRNAME/../server/all/lib/jgroups.jar:$CLASSPATH # OS specific support (must be 'true' or 'false'). cygwin=false; diff -u -r bin/run.sh /bin/run.sh --- bin/run.sh 2010-11-22 09:32:10.000000000 +0100 +++ /bin/run.sh 2010-11-28 16:12:33.000000000 +0100 @@ -7,8 +7,21 @@ ### $Id: run.sh 106046 2010-06-15 10:08:41Z mladen.turk@jboss.com $ ### -DIRNAME=`dirname $0` -PROGNAME=`basename $0` +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` + GREP="grep" # Use the maximum available, or set MAX_FD != -1 to use that diff -u -r bin/shutdown.sh /bin/shutdown.sh --- bin/shutdown.sh 2010-11-22 09:32:10.000000000 +0100 +++ /bin/shutdown.sh 2010-11-28 16:15:29.000000000 +0100 @@ -7,8 +7,21 @@ ### $Id: shutdown.sh 81068 2008-11-14 15:14:35Z dimitris@jboss.org $ ### -DIRNAME=`dirname $0` -PROGNAME=`basename $0` +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` + GREP="grep" # diff -u -r bin/twiddle.sh /bin/twiddle.sh --- bin/twiddle.sh 2010-11-22 09:32:14.000000000 +0100 +++ /bin/twiddle.sh 2010-11-28 16:16:17.000000000 +0100 @@ -7,8 +7,21 @@ ### $Id: twiddle.sh 63457 2007-06-11 16:33:37Z anil.saldhana@jboss.com $ ### -DIRNAME=`dirname $0` -PROGNAME=`basename $0` +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` + GREP="grep" # diff -u -r bin/wsconsume.sh /bin/wsconsume.sh --- bin/wsconsume.sh 2010-11-03 13:07:32.000000000 +0100 +++ /bin/wsconsume.sh 2010-11-28 16:17:05.000000000 +0100 @@ -1,7 +1,19 @@ #!/bin/sh -DIRNAME=`dirname $0` -PROGNAME=`basename $0` +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` # OS specific support (must be 'true' or 'false'). cygwin=false; diff -u -r bin/wsprovide.sh /bin/wsprovide.sh --- bin/wsprovide.sh 2010-11-03 13:07:32.000000000 +0100 +++ /bin/wsprovide.sh 2010-11-28 16:17:26.000000000 +0100 @@ -1,7 +1,19 @@ #!/bin/sh -DIRNAME=`dirname $0` -PROGNAME=`basename $0` +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` # OS specific support (must be 'true' or 'false'). cygwin=false; diff -u -r bin/wsrunclient.sh /bin/wsrunclient.sh --- bin/wsrunclient.sh 2010-11-03 13:07:32.000000000 +0100 +++ /bin/wsrunclient.sh 2010-11-28 16:17:39.000000000 +0100 @@ -1,7 +1,19 @@ #!/bin/sh -DIRNAME=`dirname $0` -PROGNAME=`basename $0` +# Extract the directory and the program name +# takes care of symlinks +PRG="$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 +DIRNAME=`dirname "$PRG"` +PROGNAME=`basename "$PRG"` if [ $# -eq 0 ]; then echo "$PROGNAME is a command line tool that invokes a JBossWS JAX-WS Web Service client."