#!/bin/bash #determine requested release kit echo $0 exit function show_title() { echo "O---------------------------------------------O" echo echo " $rk_name "; echo " $rk_fullname "; echo echo "O---------------------------------------------O" } #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 " -help" echo " show this help screen" 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 " -descend " echo " execute only the target with the given address, including subtargets" echo echo echo " -cmd" echo " show the ant command being used by $rk_name" echo echo " -properties" echo " show the properties required/allowed in $rk_name-build.properties" } #cd up a level or two if needed if [ ! -e "$rk_name-build.properties" ]; then if [ -e "../$rk_name-build.properties" ]; then RKOLDPWD=`pwd` cd .. elif [ -e "../../$rk_name-build.properties" ]; then RKOLDPWD=`pwd` cd ../.. fi fi #set ANT_HOME export ANT_HOME=$RK_HOME/core/ant export ANT_OPTS=-Xmx800M #create the command toexec="ant -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" == "-cmd" ]; then show_cmd=true else toexec="$toexec $1" fi shift done if [ "$target" != "" ]; then toexec="$toexec $target" fi #execute (or show the command to be executed) if [ "$show_cmd" == "true" ]; then echo $toexec else show_title | tee ${rk_name}.out $toexec 2>&1 | tee -a ${rk_name}.out fi if [ "$RKOLDPWD" != "" ]; then cd $RKOLDPWD fi