#pre checks if [ "$rk_name" == "" ]; then echo "rk_name not set"; exit; elif [ "$RK_HOME" == "" ]; then echo "RK_HOME not set"; exit fi function show_help { echo "$rk_name - $rk_fullname" echo "Helps you to create releases from the Repository" echo echo "usage: $rk_name [-sim] [-from ] [other-args]" echo " -sim" echo " simulation only, don't actually do anything" echo echo " -from " echo " start execution from the target with the given target address" echo echo " -to " echo " stop execution just before the target with the given target address" echo echo echo " -descend " echo " execute only the target with the given address, including subtargets" echo echo " -cp" echo " show the classpath being used by $rk_name" } #work out the classpath CLASSPATH=$JAVA_HOME/lib/tools.jar for file in $RK_HOME/lib/*.jar; do CLASSPATH=$CLASSPATH:$file done for file in $RK_HOME/packages/ant/lib/*.jar; do CLASSPATH=$CLASSPATH:$file done for file in $RK_HOME/packages/ant-installer/lib/*.jar; do CLASSPATH=$CLASSPATH:$file done CLASSPATH=$CLASSPATH:$RK_HOME/packages/ant-installer/classes export CLASSPATH #set ANT_HOME export ANT_HOME=$RK_HOME/packages/ant #create the command toexec="$ANT_HOME/bin/ant -addressing -lib `pwd`/installer/classes -f $RK_HOME/ant-scripts/build.xml -Dbasedir=`pwd` -D$rk_name.home=$RK_HOME" #pass on the arguments while [ "$1" != "" ]; do if [ "$1" == "-help" ]; then show_help exit elif [ "$1" == "-cp" ]; then echo $CLASSPATH exit else toexec="$toexec $1" shift fi done