Line | |
---|
1 | #!/bin/sh
|
---|
2 | ########################################
|
---|
3 | #
|
---|
4 | # This script checks all the configurations
|
---|
5 | #
|
---|
6 | ########################################
|
---|
7 |
|
---|
8 | # Get path
|
---|
9 | if (echo "$0" | grep '/' >/dev/null)
|
---|
10 | then
|
---|
11 | # Called-by Prog name includes path
|
---|
12 | dir=`dirname $0` # Get filedir from call
|
---|
13 | else
|
---|
14 | dir=`pwd`
|
---|
15 | fi
|
---|
16 |
|
---|
17 | # Ensure absolute path
|
---|
18 | if (echo "$dir" | grep '^/' >/dev/null)
|
---|
19 | then
|
---|
20 | # Already an absolute path
|
---|
21 | :
|
---|
22 | else
|
---|
23 | dir=`pwd`/$dir
|
---|
24 | fi
|
---|
25 |
|
---|
26 | echo using JAVA_HOME:$JAVA_HOME
|
---|
27 |
|
---|
28 | for i in `echo *`
|
---|
29 | do
|
---|
30 | cd ${dir}
|
---|
31 | EXAMPLE_INSTALLER_DIR=${dir}/${i}
|
---|
32 | if [ ! -d ${EXAMPLE_INSTALLER_DIR} ]
|
---|
33 | then
|
---|
34 | continue;
|
---|
35 | fi
|
---|
36 |
|
---|
37 | cd ${EXAMPLE_INSTALLER_DIR} || { echo "Unable to change directory to ${EXAMPLE_INSTALLER_DIR}"; exit 10; }
|
---|
38 |
|
---|
39 | echo "::::::: checking ${i}"
|
---|
40 |
|
---|
41 | if [ -f installer/install.sh ]
|
---|
42 | then
|
---|
43 | cd installer || { echo "Unable to change directory to ${EXAMPLE_INSTALLER_DIR}/artifacts/installer"; exit 10; }
|
---|
44 |
|
---|
45 | ./install.sh
|
---|
46 | STATUS=$?
|
---|
47 | if [ $STATUS != 0 ]
|
---|
48 | then
|
---|
49 | echo "${i} failed"
|
---|
50 | exit $STATUS
|
---|
51 | fi
|
---|
52 |
|
---|
53 | if [ -f antinstall-config-alternative.xml ]
|
---|
54 | then
|
---|
55 | ./install.sh -type alternative
|
---|
56 | STATUS=$?
|
---|
57 |
|
---|
58 | if [ $STATUS != 0 ]
|
---|
59 | then
|
---|
60 | echo "${i} failed"
|
---|
61 | exit $STATUS
|
---|
62 | fi
|
---|
63 | fi
|
---|
64 | else
|
---|
65 | if [ -d artifacts ]
|
---|
66 | then
|
---|
67 | cd artifacts || { echo "Unable to change directory to ${EXAMPLE_INSTALLER_DIR}/artifacts"; exit 10; }
|
---|
68 | $JAVA_HOME/bin/java -jar *.jar
|
---|
69 | STATUS=$?
|
---|
70 | if [ $STATUS != 0 ]
|
---|
71 | then
|
---|
72 | echo "${i} failed"
|
---|
73 | exit $STATUS
|
---|
74 | fi
|
---|
75 |
|
---|
76 | if [ -f ../installer/antinstall-config-alternative.xml ]
|
---|
77 | then
|
---|
78 | $JAVA_HOME/bin/java -jar *.jar -type alternative
|
---|
79 | STATUS=$?
|
---|
80 | if [ $STATUS != 0 ]
|
---|
81 | then
|
---|
82 | echo "${i} failed"
|
---|
83 | exit $STATUS
|
---|
84 | fi
|
---|
85 | fi
|
---|
86 | else
|
---|
87 | echo "Skipping ${i} as don't know how to run it"
|
---|
88 | fi
|
---|
89 | fi
|
---|
90 | done
|
---|
91 | exit $STATUS
|
---|
Note:
See
TracBrowser
for help on using the repository browser.