source: main/trunk/release-kits/shared/linux/rk@ 21384

Last change on this file since 21384 was 21384, checked in by oranfry, 14 years ago

all the *rk2s being replaced by rk2

  • Property svn:executable set to *
File size: 2.0 KB
Line 
1#!/bin/bash
2
3function show_title() {
4 echo "O---------------------------------------------O"
5 echo
6 echo " $rk_name ";
7 echo " $rk_fullname ";
8 echo
9 echo "O---------------------------------------------O"
10
11}
12
13#pre checks
14if [ "$rk_name" == "" ]; then
15 echo "rk_name not set";
16 exit;
17elif [ "$RK_HOME" == "" ]; then
18 echo "RK_HOME not set";
19 exit
20fi
21
22function show_help {
23
24 echo "$rk_name - $rk_fullname"
25 echo "Helps you to create releases from the Repository"
26 echo
27 echo "usage: $rk_name [-sim] [-from <target>] [other-args]"
28 echo " -sim"
29 echo " simulation only, don't actually do anything"
30 echo
31 echo " -help"
32 echo " show this help screen"
33 echo
34 echo " -from <target>"
35 echo " start execution from the target with the given target address"
36 echo
37 echo " -to <target>"
38 echo " stop execution just before the target with the given target address"
39 echo
40 echo " -descend <target>"
41 echo " execute only the target with the given address, including subtargets"
42 echo
43 echo
44 echo " -cmd"
45 echo " show the ant command being used by $rk_name"
46 echo
47 echo " -properties"
48 echo " show the properties required/allowed in $rk_name-build.properties"
49
50}
51
52#cd up a level or two if needed
53if [ ! -e "$rk_name-build.properties" ]; then
54 if [ -e "../$rk_name-build.properties" ]; then
55 RKOLDPWD=`pwd`
56 cd ..
57 elif [ -e "../../$rk_name-build.properties" ]; then
58 RKOLDPWD=`pwd`
59 cd ../..
60 fi
61fi
62
63#set ANT_HOME
64export ANT_HOME=$RK_HOME/core/ant
65export ANT_OPTS=-Xmx800M
66
67#create the command
68toexec="ant -lib `pwd`/installer/classes -f $RK_HOME/ant-scripts/build.xml -Dbasedir=`pwd` -D$rk_name.home=$RK_HOME"
69
70#pass on the arguments
71while [ "$1" != "" ]; do
72
73 if [ "$1" == "-help" ]; then
74 show_help
75 exit
76 elif [ "$1" == "-cmd" ]; then
77 show_cmd=true
78 else
79 toexec="$toexec $1"
80 fi
81 shift
82
83done
84
85if [ "$target" != "" ]; then
86 toexec="$toexec $target"
87fi
88
89#execute (or show the command to be executed)
90if [ "$show_cmd" == "true" ]; then
91 echo $toexec
92else
93 show_title | tee ${rk_name}.out
94 $toexec 2>&1 | tee -a ${rk_name}.out
95fi
96
97if [ "$RKOLDPWD" != "" ]; then
98 cd $RKOLDPWD
99fi
100
Note: See TracBrowser for help on using the repository browser.