awips2/rpms/awips2.core/Installer.java/build.sh
Bryan Kowal 101fd09211 Issue #2163 - disable Java 7 build
Former-commit-id: eb2bba4ac4a43eff894a23f714c8b71fba20419c
2013-09-09 09:46:09 -05:00

44 lines
1.1 KiB
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.6
SPECS=1.6/component.spec
buildRPM ${SPECS}
if [ $? -ne 0 ]; then
exit 1
fi
exit 0
# build java 1.7
SPECS=1.7/component.spec
buildRPM ${SPECS}
if [ $? -ne 0 ]; then
exit 1
fi