diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-11 20:08:05 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-03-11 20:08:05 +0000 |
commit | 7f794d8ae4785c0f23dc5b007e7488a59327aa7b (patch) | |
tree | 96e8af288807f3693d66f5c0e52c8aab2f7e4147 /java/sca/distribution/all/src | |
parent | 71a350f58078b9be740e600a9de1dc5cbf2365d7 (diff) |
TUSCANY-2915 - Applying patch from Well Yao to provide a unix tuscany launcher script
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@752602 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/distribution/all/src')
-rw-r--r-- | java/sca/distribution/all/src/main/release/launcher/tuscany.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/java/sca/distribution/all/src/main/release/launcher/tuscany.sh b/java/sca/distribution/all/src/main/release/launcher/tuscany.sh new file mode 100644 index 0000000000..b053afe4e1 --- /dev/null +++ b/java/sca/distribution/all/src/main/release/launcher/tuscany.sh @@ -0,0 +1,54 @@ +# 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 + +#!/bin/bash + +# copied from tomcat catalina.sh +# 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 CATALINA_HOME if not already set +[ -z "$TUSCANY_HOME" ] && TUSCANY_HOME=`cd "$PRGDIR/.." ; pwd` + +if [ "$1" = "/?" ] ; then + echo "Apache Tuscany SCA runtime launcher" + echo "TUSCANY [debug] contributions" + echo " debug enable Java remote debugging" + echo " contributions list of SCA contribution file names seperated by spaces. All" + echo " deployable composites found in the contributions will be run." + exit 1 +fi + +_XDEBUG="" +if [ "$1" = "debug" ] ; then + _XDEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y" + shift +fi + +java $_XDEBUG -jar $TUSCANY_HOME/bin/launcher.jar "$@" |