Line | |
---|
1 | #!/bin/sh
|
---|
2 | ####################################################
|
---|
3 | #
|
---|
4 | # This script builds all the installers
|
---|
5 | # Usage: buildall.sh [other_args_to_ant_like_-v]
|
---|
6 | #
|
---|
7 | ####################################################
|
---|
8 |
|
---|
9 | # Get path
|
---|
10 | if (echo "$0" | grep '/' >/dev/null)
|
---|
11 | then
|
---|
12 | # Called-by Prog name includes path
|
---|
13 | dir=`dirname $0` # Get filedir from call
|
---|
14 | else
|
---|
15 | dir=`pwd`
|
---|
16 | fi
|
---|
17 |
|
---|
18 | # Ensure absolute path
|
---|
19 | if (echo "$dir" | grep '^/' >/dev/null)
|
---|
20 | then
|
---|
21 | # Already an absolute path
|
---|
22 | :
|
---|
23 | else
|
---|
24 | dir=`pwd`/$dir
|
---|
25 | fi
|
---|
26 |
|
---|
27 |
|
---|
28 | echo using JAVA_HOME:$JAVA_HOME
|
---|
29 |
|
---|
30 | # Iterate over the directories
|
---|
31 | for i in `echo *`
|
---|
32 | do
|
---|
33 | cd ${dir}
|
---|
34 | INSTALLER_BUILD_DIR=${dir}/${i}/build
|
---|
35 | if [ ! -d ${INSTALLER_BUILD_DIR} ]
|
---|
36 | then
|
---|
37 | continue;
|
---|
38 | fi
|
---|
39 |
|
---|
40 | cd ${INSTALLER_BUILD_DIR} || { echo "Unable to change directory to ${INSTALLER_BUILD_DIR}"; exit 10; }
|
---|
41 |
|
---|
42 | if [ ! -f build.xml ]
|
---|
43 | then
|
---|
44 | echo "Skipping ${i} as no build.xml file"
|
---|
45 | continue
|
---|
46 | fi
|
---|
47 |
|
---|
48 | echo "::::::: building ${i}"
|
---|
49 | ant $*
|
---|
50 | STATUS=$?
|
---|
51 | if [ $STATUS != 0 ]
|
---|
52 | then
|
---|
53 | echo "build of ${i} failed"
|
---|
54 | exit $STATUS
|
---|
55 | fi
|
---|
56 | done
|
---|
57 |
|
---|
58 | exit $STATUS |
---|
Note:
See
TracBrowser
for help on using the repository browser.