source: main/trunk/release-kits/bin/rk@ 21385

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

rearranging release kits into one

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