You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jg...@apache.org on 2005/08/10 00:57:23 UTC
svn commit: r231131 - /geronimo/trunk/modules/assembly/src/scripts/deploy.sh
Author: jgenender
Date: Tue Aug 9 15:57:22 2005
New Revision: 231131
URL: http://svn.apache.org/viewcvs?rev=231131&view=rev
Log:
deploy.sh could not be run outside of the bin dir. This fixes that.
Modified:
geronimo/trunk/modules/assembly/src/scripts/deploy.sh
Modified: geronimo/trunk/modules/assembly/src/scripts/deploy.sh
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/assembly/src/scripts/deploy.sh?rev=231131&r1=231130&r2=231131&view=diff
==============================================================================
--- geronimo/trunk/modules/assembly/src/scripts/deploy.sh (original)
+++ geronimo/trunk/modules/assembly/src/scripts/deploy.sh Tue Aug 9 15:57:22 2005
@@ -18,7 +18,6 @@
# $Rev$ $Date$
# --------------------------------------------------------------------
-DEPLOYER_JAR=deployer.jar
ARGS=
if [ -z "$JAVA_HOME" ]; then
@@ -32,6 +31,20 @@
fi
JAVA=$JAVA_HOME/bin/java
+
+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
+
+PRGDIR=`dirname "$PRG"`
+DEPLOYER_JAR=$PRGDIR/deployer.jar
if [ ! -f "$DEPLOYER_JAR" ]; then
echo "Unable to locate the $DEPLOYER_JAR jar"