You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oodt.apache.org by pr...@apache.org on 2011/11/17 02:25:44 UTC

svn commit: r1202967 - /oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr

Author: pramirez
Date: Thu Nov 17 01:25:44 2011
New Revision: 1202967

URL: http://svn.apache.org/viewvc?rev=1202967&view=rev
Log:
OODT-120 Make sure FILEMGR_HOME is exported so it can be referenced from within filemgr.properties

Modified:
    oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr

Modified: oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr
URL: http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr?rev=1202967&r1=1202966&r2=1202967&view=diff
==============================================================================
--- oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr (original)
+++ oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr Thu Nov 17 01:25:44 2011
@@ -44,20 +44,21 @@ PRGDIR=`dirname "$PRG"`
 # Only set OODT_HOME if not already set
 [ -z "$OODT_HOME" ] && OODT_HOME=`cd "$PRGDIR/../../.." ; pwd`
 
+# Get OODT environment set up
+if [ -r "$OODT_HOME"/bin/env.sh ]; then
+  . "$OODT_HOME"/bin/env.sh
+fi
+
 # Only set FILEMGR_HOME if not already set
 if [ -z "$FILEMGR_HOME" ]; then
   FILEMGR_HOME="$OODT_HOME"/components/filemgr
+  export FILEMGR_HOME
 fi
 
 if [ -z "$FILEMGR_PID" ]; then
   FILEMGR_PID="$FILEMGR_HOME"/run/cas.filemgr.pid
 fi 
 
-# Get OODT environment set up
-if [ -r "$OODT_HOME"/bin/env.sh ]; then
-  . "$OODT_HOME"/bin/env.sh
-fi
-
 # For Cygwin, ensure paths are in UNIX format before anything is touched
 if $cygwin; then
   [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
@@ -74,6 +75,10 @@ if [ "$1" = "start" ]; then
       exit 1
     fi
   fi
+
+  # Move to bin directory in case this is called from some other directory. 
+  # This is to keep relative paths correct.
+  cd "$FILEMGR_HOME"/bin
   
   "$_RUNJAVA" $JAVA_OPTS $OODT_OPTS \
     -Djava.endorsed.dirs="$FILEMGR_HOME"/lib \