From d9591bb12f669a1380df046311b8ab7f27726761 Mon Sep 17 00:00:00 2001 From: jensp Date: Tue, 2 Aug 2011 19:05:03 +0000 Subject: [PATCH] =?UTF-8?q?ccm=20Bash-Skript=20f=C3=BCr=20Aufruf=20vom=20c?= =?UTF-8?q?om.arsdigita.packaging.MasterTool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@1045 8810af33-2d31-482b-a856-94f89814c4df --- ccm-core/bin/ccm | 51 +++++++++++++++++++++++++++++++++++++++++++ ccm-core/bin/ccm-run2 | 5 +++++ 2 files changed, 56 insertions(+) create mode 100644 ccm-core/bin/ccm diff --git a/ccm-core/bin/ccm b/ccm-core/bin/ccm new file mode 100644 index 000000000..c5deb51f9 --- /dev/null +++ b/ccm-core/bin/ccm @@ -0,0 +1,51 @@ +#!/bin/bash + +# This script is a wrapper for calling the CCM commandline utilites +# used for maintence of a CCM installation. + +# Variables for directories. +# The path are relative to the bin directory of the CCM installation. This +# means that this script has to be executed from the bin directory. If you +# want to use this script from another directory, or include it into your +# PATH, you have to adjust the paths. +CCM_LIB_DIR="../lib" +CCM_HOME_DIR="../.." +# Path of the lib directory of the Tomcat Server which runs the CCM installation. +# If the CATALINA_HOME enviroment variable is not set on your system you have +# either to set this environment variable (recommened) +# to adjust this path to point to the lib directory of your Tomcat installation +# (if you installed the Tomcat using the package manager of your distribution +# this is usally /usr/share/tomcat6/lib) +# To set an environment variable you have usally to add an file to the /etc/profile.d +# directory, for example tomcat.sh. In this file, you can set environment variables +# using the 'export' command. This line might look like this: +# export CATALINA_HOME=/usr/share/tomcat6/lib +CATALINA_LIB_DIR="${CATALINA_HOME}/lib" + +# Script logic starts here +echo "checking if all paths are correct..." +files=$(ls ${CCM_LIB_DIR}/ccm-core*.jar 2> /dev/null | wc -l) + +if [ "$files" == "0" ] +then + echo "Error: CCM_LIB_DIR is invalid \(no ccm-core*.jar file\(s\) in CCM_LIB_DIR\)." + exit 1 +fi + +if [ ! -d ${CCM_HOME_DIR}/__ccm__ ] +then + echo "Error: CCM_HOME_DIR path is invalid \(no __ccm__ directory in CCM_HOME_DIR\)." + exit 1 +fi + +if [ ! -f ${CATALINA_LIB_DIR}/catalina.jar ] +then + echo "Error: CATALINA_LIB_DIR is invalid \(no catalina.jar in CATALINA_LIB_DIR\)." + exit 1 +fi + +#Convert to absolute path: +CCM_HOME_DIR=`cd ${CCM_HOME_DIR}; pwd` + +echo "Starting CCM-Tool..." +java -cp ${CCM_LIB_DIR}/"*":${CATALINA_LIB_DIR}/"*" -Dccm.home=${CCM_HOME_DIR} "com.arsdigita.packaging.MasterTool" "$@" \ No newline at end of file diff --git a/ccm-core/bin/ccm-run2 b/ccm-core/bin/ccm-run2 index 3a41c0a6c..85240cb01 100644 --- a/ccm-core/bin/ccm-run2 +++ b/ccm-core/bin/ccm-run2 @@ -12,9 +12,14 @@ CCM_LIB_DIR="../lib" CCM_HOME_DIR="../.." # Path of the lib directory of the Tomcat Server which runs the CCM installation. # If the CATALINA_HOME enviroment variable is not set on your system you have +# either to set this environment variable (recommened) # to adjust this path to point to the lib directory of your Tomcat installation # (if you installed the Tomcat using the package manager of your distribution # this is usally /usr/share/tomcat6/lib) +# To set an environment variable you have usally to add an file to the /etc/profile.d +# directory, for example tomcat.sh. In this file, you can set environment variables +# using the 'export' command. This line might look like this: +# export CATALINA_HOME=/usr/share/tomcat6/lib CATALINA_LIB_DIR="${CATALINA_HOME}/lib" # Script logic starts here