Author: pramirez
Date: Thu Nov 17 06:03:25 2011
New Revision: 1203065

URL: http://svn.apache.org/viewvc?rev=1203065&view=rev
Log:
OODT-120 Finish off filemgr bin scripts

Modified:
    
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/assembly/assembly.xml
    
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr-client
    
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/query-tool

Modified: 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/assembly/assembly.xml
URL: 
http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/assembly/assembly.xml?rev=1203065&r1=1203064&r2=1203065&view=diff
==============================================================================
--- 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/assembly/assembly.xml
 (original)
+++ 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/assembly/assembly.xml
 Thu Nov 17 06:03:25 2011
@@ -41,6 +41,7 @@
       <outputDirectory>filemgr/etc</outputDirectory>
       <includes>
         <include>**.properties</include>
+        <include>**.xml</include>
       </includes>
       <fileMode>664</fileMode>
       <directoryMode>775</directoryMode>

Modified: 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr-client
URL: 
http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr-client?rev=1203065&r1=1203064&r2=1203065&view=diff
==============================================================================
--- 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr-client
 (original)
+++ 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/filemgr-client
 Thu Nov 17 06:03:25 2011
@@ -1,31 +1,79 @@
 #!/bin/sh
-#/*
-# * Licensed to the Apache Software Foundation (ASF) under one or more
-# * contributor license agreements. See the NOTICE file distributed with
-# * this work for additional information regarding copyright ownership.
-# * The ASF licenses this file to You under the Apache License, Version 2.0
-# * (the "License"); you may not use this file except in compliance with
-# * the License. You may obtain a copy of the License at
-# *
-# * http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
 #
-if [ -z $JAVA_HOME ] ; then
-JAVA_HOME=/path/to/java/home
-else
-JAVA_HOME=${JAVA_HOME}
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+darwin=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+Darwin*) darwin=true;;
+esac
+
+# resolve links - $0 may be a softlink
+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
+
+# Get standard environment variables
+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
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
+  [ -n "$OODT_HOME" ] && OODT_HOME=`cygpath --unix "$OODT_HOME"`
+  [ -n "$OODT_BASE" ] && OODT_BASE=`cygpath --unix "$OODT_BASE"`
+  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
 fi
 
-export JAVA_HOME
+# Move to bin directory in case this is called from some other directory.
+# This is to keep relative paths correct.
+cd "$FILEMGR_HOME"/bin
 
-$JAVA_HOME/bin/java \
-     -Djava.ext.dirs=../lib \
-     -Dorg.apache.oodt.cas.filemgr.properties=../conf/filemgr.properties \
-     -Djava.util.logging.config.file=../conf/logging.properties \
-     org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient $*
+"$_RUNJAVA" $JAVA_OPTS $OODT_OPTS \
+  -Djava.endorsed.dirs=../lib \
+  -Dorg.apache.oodt.cas.filemgr.properties=../conf/filemgr.properties \
+  -Djava.util.logging.config.file=../conf/logging.properties \
+  org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient "$@"

Modified: 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/query-tool
URL: 
http://svn.apache.org/viewvc/oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/query-tool?rev=1203065&r1=1203064&r2=1203065&view=diff
==============================================================================
--- 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/query-tool
 (original)
+++ 
oodt/trunk/mvn/archetypes/radix/src/main/resources/archetype-resources/filemgr/src/main/resources/bin/query-tool
 Thu Nov 17 06:03:25 2011
@@ -1,19 +1,77 @@
 #!/bin/sh
-#/*
-# * Licensed to the Apache Software Foundation (ASF) under one or more
-# * contributor license agreements. See the NOTICE file distributed with
-# * this work for additional information regarding copyright ownership.
-# * The ASF licenses this file to You under the Apache License, Version 2.0
-# * (the "License"); you may not use this file except in compliance with
-# * the License. You may obtain a copy of the License at
-# *
-# * http://www.apache.org/licenses/LICENSE-2.0
-# *
-# * Unless required by applicable law or agreed to in writing, software
-# * distributed under the License is distributed on an "AS IS" BASIS,
-# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# * See the License for the specific language governing permissions and
-# * limitations under the License.
-# */
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
 #
-$JAVA_HOME/bin/java -Djava.ext.dirs=../lib 
org.apache.oodt.cas.filemgr.tools.QueryTool $*
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false
+os400=false
+darwin=false
+case "`uname`" in
+CYGWIN*) cygwin=true;;
+OS400*) os400=true;;
+Darwin*) darwin=true;;
+esac
+
+# resolve links - $0 may be a softlink
+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
+
+# Get standard environment variables
+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
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin; then
+  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
+  [ -n "$OODT_HOME" ] && OODT_HOME=`cygpath --unix "$OODT_HOME"`
+  [ -n "$OODT_BASE" ] && OODT_BASE=`cygpath --unix "$OODT_BASE"`
+  [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+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=../lib \
+  org.apache.oodt.cas.filemgr.tools.QueryTool "$@"


Reply via email to