geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r231131 - /geronimo/trunk/modules/assembly/src/scripts/deploy.sh
Date Tue, 09 Aug 2005 22:57:23 GMT
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"



Mime
View raw message