source: release-kits/lirk2/bin/lirk2@ 16005

Last change on this file since 16005 was 16005, checked in by oranfry, 16 years ago

updates after the change of installer resources location in the repository

  • Property svn:executable set to *
File size: 2.6 KB
Line 
1function show_help {
2 echo "LiRK2 - the LInux Release Kit for greenstone3"
3 echo "Helps you to create releases of Greenstone2 from the Repository"
4 echo
5 echo "usage: lirk2 [-sim] [-from <target>] [other-args]"
6 echo " -sim"
7 echo " (shortcut for -Dexecute=false)"
8 echo " simulation only, don't actually do anything"
9 echo
10 echo " -from <target>"
11 echo " (shortcut for -Dresume.from=<target>)"
12 echo " start execution from the target with the given target address"
13 echo " first level targets can be referred to by name. E.g., -from compile is the same as -from 1"
14 echo
15 echo " -descend"
16 echo " (shortcut for -Dresume.mode=descend)"
17 echo " execute only the descendents of the target specified with -from"
18 echo " for example, with -from 3 -descend, targets 3.1, 3.2, 3.3 etc. would be executed, but execution
19 echo " would stop before target 4
20 echo
21 echo " -cp"
22 echo " show the classpath being used by LiRK2"
23
24}
25
26#work out the classpath
27CLASSPATH=$JAVA_HOME/lib/tools.jar
28for file in $LIRK2_HOME/lib/*.jar; do
29 CLASSPATH=$CLASSPATH:$file
30done
31for file in $LIRK2_HOME/bin/apache-ant-1.6.5/lib/*.jar; do
32 CLASSPATH=$CLASSPATH:$file
33done
34for file in $LIRK2_HOME/bin/ant-installer/lib/*.jar; do
35 CLASSPATH=$CLASSPATH:$file
36done
37CLASSPATH=$CLASSPATH:$LIRK2_HOME/bin/ant-installer/classes
38
39
40#create the command
41toexec="$LIRK2_HOME/bin/apache-ant-1.6.5/bin/ant -lib `pwd`/installer -f $LIRK2_HOME/ant-scripts/build.xml -Dbasedir=`pwd` -Dlirk2.home=$LIRK2_HOME"
42
43#pass on the arguments
44while [ "$1" != "" ]; do
45
46 if [ "$1" == "-help" ]; then
47 show_help
48 exit
49
50 elif [ "$1" == "-cp" ]; then
51 echo $CLASSPATH
52 exit
53
54 elif [ "$1" == "-sim" ]; then
55 toexec="$toexec -Dexecute=false"
56 shift
57
58 elif [ "$1" == "-descend" ]; then
59 toexec="$toexec -Dresume.mode=descend"
60 shift
61
62 elif [ "$1" == "-from" ]; then
63
64 toexec="$toexec -Dresume.from="
65 from=`echo $2 | sed 's/compile/1/g' | sed 's/create-distributions/2/g' | sed 's/create-installer/3/g' | sed 's/wrap/4/g'`
66 toexec=$toexec$from
67 shift 2
68
69 elif [ "$1" == "-to" ]; then
70
71 toexec="$toexec -Dresume.to="
72 to=`echo $2 | sed 's/compile/1/g' | sed 's/create-distributions/2/g' | sed 's/create-installer/3/g' | sed 's/wrap/4/g'`
73 toexec=$toexec$to
74 shift 2
75
76
77 else
78 toexec="$toexec $1"
79 shift
80 fi
81
82done
83
84#echo $toexec
85echo "O---------------------------------------O"
86echo "| |"
87echo "| LiRK2 |"
88echo "| Linux Release Kit for Greenstone2 |"
89echo "| |"
90echo "O---------------------------------------O"
91echo "Basedir : `pwd`"
92
93$toexec
Note: See TracBrowser for help on using the repository browser.