awips2/rpms/awips2.core/Installer.java/build.sh
Bryan Kowal 58c68ad717 Issue #2423 - Java 7 Revision 40 for Linux
Former-commit-id: aca0ce04b8 [formerly ef93741056] [formerly 3b1f089cbd] [formerly aca0ce04b8 [formerly ef93741056] [formerly 3b1f089cbd] [formerly 26f787ac83 [formerly 3b1f089cbd [formerly 665399b4e10d7d001edc2533b29324da48b78aa9]]]]
Former-commit-id: 26f787ac83
Former-commit-id: 42298eb650 [formerly 2e9836e506] [formerly 9ca71543985cf366b72245955e1fe6c6e51848a9 [formerly 429c534da0]]
Former-commit-id: 711ed72151263981fca589f1d61416eda2f74eea [formerly 9f7222a1b3]
Former-commit-id: 16efd625bb
2013-10-03 11:54:23 -05:00

36 lines
1,018 B
Bash

# verify that the workspace, rpm top directory, and build root are available in the environment
if [ -z ${WORKSPACE} ]; then
echo "Error: the location of the baseline workspace must be specified using the WORKSPACE environment variable."
exit 1
fi
if [ -z ${AWIPSII_TOP_DIR} ]; then
echo "Error: the location of the rpm top directory must be specified using the AWIPSII_TOP_DIR environment variable."
exit 1
fi
if [ -z ${AWIPSII_BUILD_ROOT} ]; then
echo "Error: the location of the AWIPS II build root must be specified using the AWIPSII_BUILD_ROOT environment variable."
exit 1
fi
function buildRPM()
{
SPECS=${1}
/usr/bin/rpmbuild -ba \
--define "_topdir ${AWIPSII_TOP_DIR}" \
--define "_build_root ${AWIPSII_BUILD_ROOT}" \
--define "_baseline_workspace ${WORKSPACE}" \
--buildroot ${AWIPSII_BUILD_ROOT} \
${SPECS}
if [ $? -ne 0 ]; then
return 1
fi
}
# build java 1.7
SPECS=1.7/component.spec
buildRPM ${SPECS}
if [ $? -ne 0 ]; then
exit 1
fi