CCM NG: Build helper script:

- Runtime for running a bundle is now deduced from the bundle name
- Code cleanup


git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@4615 8810af33-2d31-482b-a856-94f89814c4df
ccm-docs
jensp 2017-03-02 18:22:25 +00:00
parent c871e7cd40
commit a44c98233e
2 changed files with 155 additions and 179 deletions

View File

@ -188,16 +188,21 @@ c) Extract Wildfly
d) Ask for the username and password for a management user for Wildfly (see d) Ask for the username and password for a management user for Wildfly (see
the Wildfly documentation for details on that). the Wildfly documentation for details on that).
run [-r RUNTIME | --with-runtime RUNTIME] [BUNDLE] run -r [RUNTIME]| BUNDLE
================================================== ==================================================
Starts an application server (at the moment only Wildfly is supported). If a Starts an application server (at the moment only Wildfly is supported).
bundle is provided the bundle is build (skiping all JUnit tests) and deployed
to the application server. If no bundle is provided the application server is
only started. This is useful for configuring the application server.
If no runtime is provided using -r or --with-runtime Wildfly is used as If "-r" is set only the application server will be started and no bundle will
default. be deployed. This is useful for configuring the application server. If no
runtime is specified Wildfly will be used.
If a bundle is provided the runtime (application server) to start is deduced
from the name of the bundle. For example if the name of the bundle ends with
'-wildfly' Wildfly is started and the bundle is deployed to Wildfly.
The method of starting the application server and deploying the bundle depends
on the application server.
IMPORTANT: You must configure a datasource with the JNDI-URL required by the IMPORTANT: You must configure a datasource with the JNDI-URL required by the
bundle you want to run before running LibreCCM. For Wildfly this can be done bundle you want to run before running LibreCCM. For Wildfly this can be done
@ -206,7 +211,7 @@ using Wildfly's administration UI available at
http://localhost:9990 http://localhost:9990
Supported iApplication server Supported Application servers
============================= =============================
Wildfly Wildfly
@ -245,5 +250,12 @@ Some JNDI-Datasource-URLs:
ccm-bundle-devel-wildfly java:/comp/env/jdbc/libreccm/db ccm-bundle-devel-wildfly java:/comp/env/jdbc/libreccm/db
For running integration tests via Arquillian in Wildfly the
wildfly-arquillian-container-managed container adapter is used for managed
profiles. For remote profiles Wildfly is started by invoking bin/standalone.sh
directly, but only if the "start" parameter is present.
For running LibreCCM the wildfly-maven-plugin is used.

300
ccm.sh
View File

@ -2,14 +2,44 @@
# Provides shortcuts for working with LibreCCM # Provides shortcuts for working with LibreCCM
wildflyversion="10.1.0.Final" wildfly_version="10.1.0.Final"
wildflypidfile="./WILDFLY_PID" wildfly_pid_file="./WILDFLY_PID"
wildfly_home=""
# Helper function for finding Wildfly. First the function checks if the
# environment variable JBOSS_HOME is set. If JBOSS_HOME is set is make sure
# that JBOSS_HOME points to a valid Wildfly installation. If JBOSS_HOME is not
# set the function checks if Wildfly is installed in ./runtime. If there is no
# Wildfly in runtime the function exits the script.
find_wildfly_home() {
#local wildfly_home=""
if [[ -n $JBOSS_HOME ]]; then
echo "JBOSS_HOME = $JBOSS_HOME"
if [ -f "$JBOSS_HOME/bin/standalone.sh" ]; then
echo $JBOSS_HOME
else
echo -e "\e[41mJBOSS_HOME is set but there is no $JBOSS_HOME/bin/standalone.sh. Please make sure that JBOSS_HOME points to a valid Wildfly installation.\e[0m"
exit 1
fi
elif [[ -d "./runtime/wildfly-$wildfly_version" ]]; then
wildfly_home="./runtime/wildfly-$wildfly_version"
echo "wildfly_home is '$wildfly_home'"
pushd $wildfly_home
wildfly_home=$(pwd)
echo "wildfly_home is '$wildfly_home'"
popd
#echo $wildfly_home
else
echo -e "\e[41mThere is no Wildfly in ./runtime/ neither is JBOSS_HOME set. Please install Wildfly $wildfly_version into ./runtime/ using install-runtime or set the JBOSS_HOME enviroment variable.\e[0m"
exit 1
fi
}
# Build the project site. # Build the project site.
# #
# @param $1 (optional): Maven profile to use. # @param $1 (optional): Maven profile to use.
# #
buildsite() { build_site() {
if [ -d "$1" ]; then if [ -d "$1" ]; then
mvn clean package site site:stage -Dmaven.test.failure.ignore=true -P$1 mvn clean package site site:stage -Dmaven.test.failure.ignore=true -P$1
else else
@ -34,7 +64,7 @@ build() {
# @param $1 (mandantory): The artifact ID of the module to build. # @param $1 (mandantory): The artifact ID of the module to build.
# @param $2 (optional) : The profile to use. # @param $2 (optional) : The profile to use.
# #
buildmodule() { build_module() {
if [ -n "$1" ]; then if [ -n "$1" ]; then
if [ -n "$2" ]; then if [ -n "$2" ]; then
mvn clean package -P$2 -pl $1 -am mvn clean package -P$2 -pl $1 -am
@ -50,24 +80,15 @@ buildmodule() {
# Helper method for starting runtime for integration tests # Helper method for starting runtime for integration tests
# @param $1 (mandantory): Runtime to start # @param $1 (mandantory): Runtime to start
# #
starttestruntime() { start_test_runtime() {
if [ "$1"="wildfly" ]; then if [ "$1"="wildfly" ]; then
echo "Starting Wildfly $wildversion for running tests..." echo "Starting Wildfly running tests..."
wildflyhome="" #local wildfly_home=$(find_wildfly_home)
if [ -n "$JBOSS_HOME" ]; then
echo "Setting wildflyhome to JBOSS_HOME"
wildflyhome=$JBOSS_HOME
elif [ -d "./runtime/wildfly-$wildflyversion" ]; then
echo "Setting wildflyhome..."
wildflyhome="./runtime/wildfly-$wildflyversion"
else
echo "There is not Wildfly in ./runtime/ and JBOSS_HOME is not set."
echo "Please call install-runtime or set JBOSS_HOME"
exit 1
fi
pushd $wildflyhome find_wildfly_home
LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$wildflypidfile ./bin/standalone.sh & #pushd $(find_wildfly_home)
pushd $wildfly_home
LAUNCH_JBOSS_IN_BACKGROUND=1 JBOSS_PIDFILE=$wildfly_pid_file ./bin/standalone.sh &
popd popd
echo "Waiting 120s for Wildfly to start up..." echo "Waiting 120s for Wildfly to start up..."
sleep 120 sleep 120
@ -79,8 +100,8 @@ starttestruntime() {
fi fi
echo "Stopping Wildfly..." echo "Stopping Wildfly..."
pushd $wildflyhome pushd $wildfly_home
kill $(<"$wildflypidfile") kill $(<"$wildfly_pid_file")
popd popd
elif [ "$1"="tomee" ]; then elif [ "$1"="tomee" ]; then
@ -97,25 +118,14 @@ starttestruntime() {
# #
# @param $1 (mandantory): Runtime to stop # @param $1 (mandantory): Runtime to stop
# #
stoptestruntime() { stop_test_runtime() {
if [ "$1" = "wildfly" ]; then if [ "$1" = "wildfly" ]; then
echo "Stopping Wildfly..." echo "Stopping Wildfly..."
find_wildfly_home
#local wildfly_home=$(find_wildfly_home)
wildflyhome="" pushd $wildfly_home
if [ -n "$JBOSS_HOME" ]; then kill $(<"$wildfly_pid_file")
echo "Setting wildflyhome to JBOSS_HOME"
wildflyhome=$JBOSS_HOME
elif [ -d "./runtime/wildfly-$wildflyversion" ]; then
echo "Setting wildflyhome..."
wildflyhome="./runtime/wildfly-$wildflyversion"
else
echo "There is no Wildfly in ./runtime/ and JBOSS_HOME is not set."
echo "Please call install-runtime or set JBOSS_HOME"
exit 1
fi
pushd $wildflyhome
kill $(<"$wildflypidfile")
popd popd
elif [ "$1" = "tomee" ]; then elif [ "$1" = "tomee" ]; then
echo "Not implemented yet." echo "Not implemented yet."
@ -128,37 +138,26 @@ stoptestruntime() {
} }
# Run all tests # Run all tests
testall() { test_all() {
echo "Running all tests for all modules..." echo "Running all tests for all modules..."
if [[ $1 =~ ^wildfly-managed.* ]]; then if [[ $1 =~ ^wildfly-managed.* ]]; then
echo "...using a managed Wildfly container" echo "...using a managed Wildfly container"
wildflyhome="" find_wildfly_home
if [ -n "$JBOSS_HOME" ]; then #local wildfly_home=$(find_wildfly_home)
echo "...JBOSS_HOME environment variable is set. Using Wildfly installation at $JBOSS_HOME."
wildflyhome=$JBOSS_HOME
elif [ -d "./runtime/wildfly-$wildflyversion" ]; then
echo "...using Wildfly installation in runtime directory"
pushd $wildflyhome
wildflyhome=`pwd`
popd
else
echo -e "\e[41mThere is no Wildfly-$wildflyversion in ./runtime nore is JBOSS_HOME set. Please install Wildfly-$wildflyversion into runtime by calling install-runtime or set the JBOSS_HOME environment variable to a valid location.\e[0m"
exit 1
fi
echo "...using profile $1" echo "...using profile $1"
echo "" echo ""
if [ -n $STARTUP_TIMEOUT ]; then if [ -n $STARTUP_TIMEOUT ]; then
mvn clean test -Djboss.home=$wildflyhome -DstartuptimeoutInSeconds=$STARTUP_TIMEOUT -P$1 mvn clean test -Djboss.home=$wildfly_home -DstartuptimeoutInSeconds=$STARTUP_TIMEOUT -P$1
else else
mvn clean test -Djboss.home=$wildflyhome -P$1 mvn clean test -Djboss.home=$wildfly_home -P$1
fi fi
elif [[ $1 =~ ^wildfly-remote.* ]]; then elif [[ $1 =~ ^wildfly-remote.* ]]; then
echo "...using a remote Wildfly container" echo "...using a remote Wildfly container"
if [[ $2 == "start" ]]; then if [[ $2 == "start" ]]; then
echo "...starting runtime" echo "...starting runtime"
starttestruntime wildfly start_test_runtime wildfly
else else
echo "...runtime is started manually" echo "...runtime is started manually"
fi fi
@ -184,7 +183,7 @@ testall() {
} }
# Run tests for a module # Run tests for a module
testmodule() { test_module() {
if [[ -z $1 ]]; then if [[ -z $1 ]]; then
echo -e "\e[41mUsage: ccm.sh test-module MODULE [PROFILE] [start]\e[0m" echo -e "\e[41mUsage: ccm.sh test-module MODULE [PROFILE] [start]\e[0m"
@ -194,32 +193,20 @@ testmodule() {
echo "Running tests for module $1..." echo "Running tests for module $1..."
if [[ $2 =~ ^wildfly-managed.* ]]; then if [[ $2 =~ ^wildfly-managed.* ]]; then
echo "...using a managed Wildfly container." echo "...using a managed Wildfly container."
wildflyhome="" find_wildfly_home
if [ -n "$JBOSS_HOME" ]; then #local wildfly_home=$(find_wildfly_home)
echo "...JBOSS_HOME enviromentment variable is set Using Wildfly installation at $JBOSS_HOME."
wildflyhome=$JBOSS_HOME
elif [ -d "./runtime/wildfly-$wildflyversion" ]; then
echo "...using Wildfly installation in runtime-directory"
pushd $wildflyhome
wildflyhome=`pwd`
popd
else
echo -e "\e[41mThere is no Wildfly-$wildfly-version in ./runtime nore is JBOSS_HOME set. Please install Wildfly-$wildfly-version into ./runtime by calling install-runtime or set the JBOSS_HOME environment variable to valid location.\e[0m"
exit 1
fi
echo "...using profile $2" echo "...using profile $2"
echo "" echo ""
if [ -n $STARTUP_TIMEOUT ]; then if [ -n $STARTUP_TIMEOUT ]; then
mvn clean test -Djboss.home=$wildflyhome -DstartupTimeoutInSeconds=$STARTUP_TIMEOUT -pl $1 -am -P$1 mvn clean test -Djboss.home=$wildfly_home -DstartupTimeoutInSeconds=$STARTUP_TIMEOUT -pl $1 -am -P$1
else else
mvn clean test -Djboss.home=$wildflyhome -pl $1 -am -P$2 mvn clean test -Djboss.home=$wildfly_home -pl $1 -am -P$2
fi fi
elif [[ $2 =~ ^wildfly-remote.* ]]; then elif [[ $2 =~ ^wildfly-remote.* ]]; then
echo "Using a remote Wildfly container..." echo "Using a remote Wildfly container..."
if [[ $3 == "start" ]]; then if [[ $3 == "start" ]]; then
echo "...starting runtime" echo "...starting runtime"
starttestruntime wildfly start_test_runtime wildfly
else else
echo "...runtime is started manually" echo "...runtime is started manually"
fi fi
@ -244,7 +231,7 @@ testmodule() {
} }
# Run a single testsuite or test # Run a single testsuite or test
runtest() { run_test() {
if [ -z "$1" -o -z "$2" ]; then if [ -z "$1" -o -z "$2" ]; then
echo -e "\e[41mUsage: ccm.sh test-module MODULE TEST [PROFILE] [start]\e[0m" echo -e "\e[41mUsage: ccm.sh test-module MODULE TEST [PROFILE] [start]\e[0m"
@ -254,33 +241,22 @@ runtest() {
echo "Running test $2 from module $1..." echo "Running test $2 from module $1..."
if [[ $3 =~ ^wildfly-managed.* ]]; then if [[ $3 =~ ^wildfly-managed.* ]]; then
echo "...using a managed Wildfly container." echo "...using a managed Wildfly container."
wildflyhome="" find_wildfly_home
if [ -n "$JBOSS_HOME" ]; then #local wildfly_home=$(find_wildfly_home)
echo "...JBOSS_HOME environment variable is set. Using Wildfly installation at $JBOSS_HOME."
wildflyhome=$JBOSS_HOME
elif [ -d "./runtime/wildfly-$wildflyversion" ]; then
echo "...using Wildfly installation in runtime directory"
pushd ./runtime/wildfly-$wildflyversion
wildflyhome=`pwd`
popd
else
echo -e "\e[41mThere is no Wildfly-$wildfly-version in ./runtime nore is JBOSS_HOME set. Please install Wildfly-$wildfly-version into ./runtime by calling install-runtime or set the JBOSS_HOME environment variable to valid location.\e[0m"
exit 1
fi
echo "...using Wildfly in $wildflyhome" echo "...using Wildfly in $wildfly_home"
echo "...using profile $3" echo "...using profile $3"
echo "" echo ""
if [ -n $STARTUP_TIMEOUT ]; then if [ -n $STARTUP_TIMEOUT ]; then
mvn clean test -Djboss.home=$wildflyhome -DstartupTimeoutInSeconds=$STARTUP_TIMEOUT -Dtest=$2 -DfailIfNoTests=false -pl $1 -am -P$3 mvn clean test -Djboss.home=$wildfly_home -DstartupTimeoutInSeconds=$STARTUP_TIMEOUT -Dtest=$2 -DfailIfNoTests=false -pl $1 -am -P$3
else else
mvn clean test -Djboss.home=$wildflyhome -Dtest=$2 -DfailIfNoTests=false -pl $1 -am -P$3 mvn clean test -Djboss.home=$wildfly_home -Dtest=$2 -DfailIfNoTests=false -pl $1 -am -P$3
fi fi
elif [[ $3 =~ ^wildfly-remote.* ]]; then elif [[ $3 =~ ^wildfly-remote.* ]]; then
echo "Using a remote Wildfly container..." echo "Using a remote Wildfly container..."
if [[ $4 == "start" ]]; then if [[ $4 == "start" ]]; then
echo "...starting runtime" echo "...starting runtime"
starttestruntime wildfly start_test_runtime wildfly
else else
echo "...runtime is started manually" echo "...runtime is started manually"
fi fi
@ -289,7 +265,7 @@ runtest() {
if [[ $4 == "start" ]]; then if [[ $4 == "start" ]]; then
echo "...stopping runtime" echo "...stopping runtime"
stoptestruntime wildfly stop_test_runtime wildfly
fi fi
else else
if [[ -n $3 ]]; then if [[ -n $3 ]]; then
@ -307,8 +283,8 @@ runtest() {
installruntime() { install_runtime() {
runtime="" local runtime=""
if [ -z $1 ]; then if [ -z $1 ]; then
runtime="wildfly" runtime="wildfly"
else else
@ -318,8 +294,8 @@ installruntime() {
echo "Installing runtime $runtime..." echo "Installing runtime $runtime..."
if [ $runtime = wildfly ]; then if [ $runtime = wildfly ]; then
if [ -d ./runtime/wildfly-$wildflyversion ]; then if [ -d ./runtime/wildfly-$wildfly_version ]; then
echo "Wildfly $wildflyversion is already installed as runtime. Exiting" echo "Wildfly $wildfly_version is already installed as runtime. Exiting"
exit 1 exit 1
fi fi
@ -328,22 +304,22 @@ installruntime() {
fi fi
pushd runtime pushd runtime
if [ -f wildfly-$wildflyversion.tar.gz ]; then if [ -f wildfly-$wildfly_version.tar.gz ]; then
echo "Wildfly $wildflyversion has already been downloaded, using existing archive." echo "Wildfly $wildfly_version has already been downloaded, using existing archive."
else else
wget http://download.jboss.org/wildfly/$wildflyversion/wildfly-$wildflyversion.tar.gz wget http://download.jboss.org/wildfly/$wildfly_version/wildfly-$wildfly_version.tar.gz
fi fi
if [ ! -f wildfly-$wildflyversion.tar.gz ]; then if [ ! -f wildfly-$wildfly_version.tar.gz ]; then
echo "Failed to download Wildfly." echo "Failed to download Wildfly."
exit 1 exit 1
fi fi
tar vxzf wildfly-$wildflyversion.tar.gz tar vxzf wildfly-$wildfly_version.tar.gz
echo "" echo ""
echo "Wildfly extracted successfully. Please provide a username and password for a Wildfly management user (admin):" echo "Wildfly extracted successfully. Please provide a username and password for a Wildfly management user (admin):"
echo "" echo ""
username="" local username=""
while [ -z $username ]; do while [ -z $username ]; do
echo -n "Username.......: " echo -n "Username.......: "
read username read username
@ -351,8 +327,8 @@ installruntime() {
echo "Username can't be empty!" echo "Username can't be empty!"
fi fi
done done
password="" local password=""
passwordrepeat="" local passwordrepeat=""
while [ -z $password -o $password != $passwordrepeat ]; do while [ -z $password -o $password != $passwordrepeat ]; do
echo -n "Password.......: " echo -n "Password.......: "
read -s password read -s password
@ -372,13 +348,13 @@ installruntime() {
done done
echo "" echo ""
echo "Creating Wildfly management user $username..." echo "Creating Wildfly management user $username..."
pushd wildfly-$wildflyversion pushd wildfly-$wildfly_version
sh ./bin/add-user.sh $username $password sh ./bin/add-user.sh $username $password
popd popd
popd popd
echo "" echo ""
echo "Wildfly $wildflyversion successfully installed in ./runtime." echo "Wildfly $wildfly_version successfully installed in ./runtime."
echo "Before running LibreCCM you have to configure a datasource." echo "Before running LibreCCM you have to configure a datasource."
echo "To do that run" echo "To do that run"
echo "" echo ""
@ -399,61 +375,60 @@ installruntime() {
} }
run() { run() {
runtime="" local runtime=""
bundle="" local runtime_only=false
local bundle=""
if [ "$1" = "-r" ]; then if [ "$1" = "-r" ]; then
runtime="$2" runtime="$2"
bundle="$3" runtime_only=true
elif [ "$1" = "--with-runtime" ]; then
runtime="$2"
bundle="$3"
else else
runtime="wildfly" runtime_only=false
bundle="$1" bundle=$1
fi fi
if [ -z $bundle ]; then if [ $runtime_only == true ]; then
echo "Running Wilfly $wildversion without a bundle (only starting Wilfly but not deploying LibreCCM)..." echo "Starting application server without deploying a bundle..."
else if [[ -z "$runtime" ]]; then
echo "Running bundle $bundle with Wildfly $wildflyversion..." echo "No application server set, using default (Wildfly)..."
fi runtime="wildfly"
fi
if [ $runtime="wildfly" ]; then
find_wildfly_home
# local wildfly_home=$(find_wildfly_home)
if [ $runtime = "wildfly" ]; then pushd $wildfly_home
wildflyhome="" sh ./bin/standalone.sh
if [ -n "$JBOSS_HOME" ]; then popd
echo "Setting wildflyhome to JBOSS_HOME" elif [ $runtime="tomee" ]; then
wildflyhome=$JBOSS_HOME echo "Not implemented yet."
elif [ -d "./runtime/wildfly-$wildflyversion" ]; then exit 0
echo "Setting wildflyhome..."
wildflyhome="./runtime/wildfly-$wildflyversion"
else else
echo "There is not Wildfly in ./runtime/ and JBOSS_HOME is not set." echo -e "\e[41mUnknown runtime $runtime. Please specify a supported runtime.\e[0m"
echo "Please call install-runtime or set JBOSS_HOME"
exit 1 exit 1
fi fi
echo "Starting Wildfly in $wildflyhome..."
if [ -z $bundle ]; then
pushd $wildflyhome
sh "./bin/standalone.sh"
popd
else
mvn -Djboss-as.home=${wildflyhome} package wildfly:run -DskipTests -pl $bundle -am -Pgeneric
fi
elif [ $runtime = "tomee" ]; then
echo "Not implemented yet"
exit 0
else else
echo "Unknown runtime $runtime. Supported runtimes are: wildfly tomee" echo "Running bundle $bundle..."
exit 1 if [[ $bundle=~^.*-wildfly$ ]]; then
find_wildfly_home
# local wildfly_home=$(find_wildfly_home)
echo "Using Wildfly in $wildfly_home..."
mvn package wildfly:run -Djboss-as.home=${wildfly_home} -DskipTests -pl $bundle -am -Pgeneric
elif [[ $bundle=~^.*-wildfly-swarm$ ]]; then
echo "Not implemented yet"
exit 0
elif [[ $bundle=~^.*-tomee$ ]]; then
echo "Not implemented yet"
exit 0
else
echo -e "\e[41mThe bundle '$bundle' has an unknown suffix. Are you sure that you specified a valid bundle?\e[0m"
fi
fi fi
} }
stopruntime() { stop_runtime() {
runtime="" local runtime=""
if [ -n "$1" ]; then if [ -n "$1" ]; then
runtime=$1 runtime=$1
else else
@ -461,18 +436,7 @@ stopruntime() {
fi fi
if [ runtime = "wildfly"]; then if [ runtime = "wildfly"]; then
wildflyhome="" echo "Nothing to do, the Wildfly Maven plugins automatically stops Wildfly."
if [ -n $JBOSS_HOME ]; then
wildflyhome="$JBOSS_HOME"
elif [ -d "./runtime/wildfly-$wildflyversion" ]; then
wildflyhome="./runtime/wildfly-$wildflyversion"
else
echo "There is no Wildfly in ./runtime/ and JBOSS_HOME is not set."
echo "Exiting."
exit 1
fi
bin/standalone.sh
elif [ $runtime = "tomee"]; then elif [ $runtime = "tomee"]; then
echo "Not implemented yet." echo "Not implemented yet."
exit 0 exit 0
@ -482,7 +446,7 @@ stopruntime() {
fi fi
} }
showhelp() { show_help() {
echo "ccm.sh is a helper script for building and running LibreCCM in a echo "ccm.sh is a helper script for building and running LibreCCM in a
development environment. It provides shortcuts for several Maven goals. The available subcommands are: development environment. It provides shortcuts for several Maven goals. The available subcommands are:
@ -508,17 +472,17 @@ development environment. It provides shortcuts for several Maven goals. The avai
} }
case $1 in case $1 in
build-site) buildsite $2 ;; build-site) build_site $2 ;;
build) build $2 ;; build) build $2 ;;
build-module) buildmodule $2 ;; build-module) build_module $2 ;;
test-all) testall $2 $3 $4 ;; test-all) test_all $2 $3 $4 ;;
test-module) testmodule $2 $3 $4 $5 ;; test-module) test_module $2 $3 $4 $5 ;;
test) runtest $2 $3 $4 $5 ;; test) run_test $2 $3 $4 $5 ;;
install-runtime) installruntime $2 ;; install-runtime) install_runtime $2 ;;
run) run $2 $3 $4 ;; run) run $2 $3 $4 ;;
stop-runtime) stopruntime $2 ;; stop-runtime) stop_runtime $2 ;;
help) showhelp ;; help) show_help ;;
*) showhelp ;; *) show_help ;;
esac esac