| 6914 |
dpurdie |
1 |
#!/bin/bash
|
|
|
2 |
|
|
|
3 |
# Used to setup the buildtool
|
|
|
4 |
# ABT_HOME - Where the ABT config files are to be fornd
|
|
|
5 |
# - Where the ABT fixed JARs are to be found
|
|
|
6 |
# ABT_JARS - Where the buildtool distribution is to be found
|
|
|
7 |
# - JAR file will be copied from here
|
|
|
8 |
# ABT_WORK - Working directory for the buildtool
|
|
|
9 |
# - The CWD of the buildtool execution
|
|
|
10 |
#
|
|
|
11 |
# Used by the buildtool
|
|
|
12 |
# GBE_ABT - Indicates the JATS that it is running an an ABT environment
|
|
|
13 |
# GBE_LOG - Path to the builtool logging directory
|
|
|
14 |
# GBE_UNC - Web server path for error logs
|
|
|
15 |
# GBE_RM_USERNAME - Release Manager credentials
|
|
|
16 |
# GBE_RM_PASSWORD - Allowing write access to Release Manager
|
|
|
17 |
# GBE_DPKG_SSH_PROPERTIES - path to ssh properties file holding ssh credentials
|
|
|
18 |
#
|
|
|
19 |
# Internal
|
|
|
20 |
# JAR - Path to the buildtool jar
|
|
|
21 |
#
|
|
|
22 |
|
|
|
23 |
ABT_HOME=/work/buildtool
|
|
|
24 |
ABT_JARS=$GBE_DPKG/buildtool/latest/etc
|
|
|
25 |
ABT_WORK=/work/abt
|
|
|
26 |
GBE_ABT=1
|
|
|
27 |
GBE_LOG=/net/auperaarc01/export/devl/abtlog
|
|
|
28 |
GBE_UNC=http://auperaarc01/devl/abtlog
|
|
|
29 |
GBE_RM_USERNAME=build_user
|
|
|
30 |
GBE_RM_PASSWORD=frog123
|
|
|
31 |
GBE_DPKG_SSH_PROPERTIES=$GBE_DPKG/.dpkg_archive/fragments.properties
|
|
|
32 |
JAR=$ABT_HOME/abtdD.jar
|
|
|
33 |
|
|
|
34 |
export ABT_HOME GBE_ABT GBE_LOG GBE_UNC GBE_DPKG_SSH_PROPERTIES
|
|
|
35 |
# do not export ABT_WORK JAR
|
|
|
36 |
|
|
|
37 |
if [ "x$GBE_RM_LOCATION" = "x" ] ; then
|
|
|
38 |
echo Error: Program abtlaunch
|
|
|
39 |
echo Error: EnvVar GBE_RM_LOCATION not set
|
|
|
40 |
echo Error: This is set within /etc/profile
|
|
|
41 |
exit 1
|
|
|
42 |
fi
|
|
|
43 |
|
|
|
44 |
if [ "x$JAVA_HOME_1_6" = "x" ] ; then
|
|
|
45 |
echo Error: Program abtlaunch
|
|
|
46 |
echo Error: EnvVar JAVA_HOME_1_6 not set
|
|
|
47 |
echo Error: This is set within /etc/profile
|
|
|
48 |
exit 1
|
|
|
49 |
fi
|
|
|
50 |
|
|
|
51 |
if [ ! -x $JAVA_HOME_1_6/bin/java ] ; then
|
|
|
52 |
echo Error: Program abtlaunch
|
|
|
53 |
echo Error: The java program does not exist
|
|
|
54 |
echo Error: Location: $JAVA_HOME_1_6/bin/java
|
|
|
55 |
exit 1
|
|
|
56 |
fi
|
|
|
57 |
|
|
|
58 |
if [ ! -d $ABT_WORK ] ; then
|
|
|
59 |
echo Error: Program abtlaunch
|
|
|
60 |
echo Error: The ABT work directory does not exist
|
|
|
61 |
echo Error: Dir: $ABT_WORK
|
|
|
62 |
exit 1
|
|
|
63 |
fi
|
|
|
64 |
|
|
|
65 |
# Copy in the latest JARS
|
|
|
66 |
cp ${ABT_JARS}/*.jar $ABT_HOME
|
|
|
67 |
if [ $? -ne 0 ]; then
|
|
|
68 |
echo Error: Program abtlaunch
|
|
|
69 |
echo Error: Error occured copying latest builtool executables
|
|
|
70 |
exit 1
|
|
|
71 |
fi
|
|
|
72 |
|
|
|
73 |
if [ ! -f $JAR ] ; then
|
|
|
74 |
echo Error: Program abtlaunch
|
|
|
75 |
echo Error: Required Jar does not exist
|
|
|
76 |
exit 1
|
|
|
77 |
fi
|
|
|
78 |
|
|
|
79 |
PATH=$ABT_HOME:$PATH
|
|
|
80 |
cd $ABT_WORK
|
|
|
81 |
#rm -f *.log
|
|
|
82 |
rm -f *.xml
|
|
|
83 |
|
|
|
84 |
$JAVA_HOME_1_6/bin/java -jar $JAR
|