Merge branch 'master_13.5.3' (13.5.3-1) into omaha_13.5.3

Former-commit-id: f04be86698 [formerly 602f138493] [formerly f04be86698 [formerly 602f138493] [formerly 972339d60f [formerly 94cbf77eed9914cb3da525dca61ea9e4dfdd16b4]]]
Former-commit-id: 972339d60f
Former-commit-id: a444c93ee7 [formerly 4c0599bae8]
Former-commit-id: 0bf9020c49
This commit is contained in:
Steve Harris 2013-10-28 14:39:22 -05:00
commit f49a22bae2
8 changed files with 275 additions and 486 deletions

149
cave/build/static/linux/cave/awips2VisualizeUtility.sh Executable file → Normal file
View file

@ -1,7 +1,38 @@
#!/bin/bash
#
#
# This software was developed and / or modified by Raytheon Company,
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
#
# U.S. EXPORT CONTROLLED TECHNICAL DATA
# This software product contains export-restricted data whose
# export/transfer/disclosure is restricted by U.S. law. Dissemination
# to non-U.S. persons whether in the United States or abroad requires
# an export license or other authorization.
#
# Contractor Name: Raytheon Company
# Contractor Address: 6825 Pine Street, Suite 340
# Mail Stop B8
# Omaha, NE 68106
# 402.291.0100
#
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
# further licensing information.
#
# This script will kill any running AlertViz and/or
# CAVE processes whenever the user logs off.
# SOFTWARE HISTORY
# Date Ticket# Engineer Description
# ------------ ---------- ----------- --------------------------
# July 10 2013 DR 16111 dhuffman Initial creation
#
#
# @author dhuffman
# @version 1.0
# This script will kill any running AlertViz and/or Cave
# processes when a user logs off.
if [ ! -f ${HOME}/vizUtility.log ]; then
touch ${HOME}/vizUtility.log
@ -9,29 +40,111 @@ else
echo "" >> ${HOME}/vizUtility.log
fi
# Find all CAVE processes.
date >> ${HOME}/vizUtility.log
function findAlertvizProcesses {
# Find all the alertviz processes.
echo "Searching for alertviz processes." >> ${HOME}/vizUtility.log
zpid=` ps u -u $USER | grep '[a]lertviz' | awk '{print $2}' `
npid=` echo $zpid | wc -w `
if [ $npid -le 0 ]
then
echo "There are no alertviz processes found." >> ${HOME}/vizUtility.log
date >> ${HOME}/vizUtility.log
fi
}
function findAlertvizShProcesses {
# Find all the alertviz.sh processes.
echo "Searching for alertviz.sh processes." >> ${HOME}/vizUtility.log
zpid=` ps u -u $USER | grep '[a]lertviz.sh' | awk '{print $2}' `
npid=` echo $zpid | wc -w `
if [ $npid -le 0 ]
then
echo "There are no alertviz.sh processes found." >> ${HOME}/vizUtility.log
date >> ${HOME}/vizUtility.log
fi
}
function findCaveProcesses {
# Find all the Cave processes.
echo "Searching for cave processes." >> ${HOME}/vizUtility.log
for pid in `ps aux | grep [c]ave | awk '{print $2}'`;
zpid=` ps u -u $USER | grep '[c]ave' | awk '{print $2}' `
npid=` echo $zpid | wc -w `
if [ $npid -le 0 ]
then
echo "There are no cave processes found." >> ${HOME}/vizUtility.log
date >> ${HOME}/vizUtility.log
fi
}
# First let's attempt to kill the processes quickly which will work if the computer is not burdened.
findAlertvizShProcesses
for pid in $zpid
do
kill -9 ${pid}
echo "Killing 'cave' process with pid ${pid}." >> ${HOME}/vizUtility.log
echo "Attempting to kill 'alertviz.sh' process with pid ${pid}." >> ${HOME}/vizUtility.log
kill ${pid} 2>> ${HOME}/vizUtility.log
done
# Find the alertviz.sh script.
echo "Searching for the alertviz.sh script." >> ${HOME}/vizUtility.log
for pid in `ps aux | grep [a]lertviz.sh | awk '{print $2}'`;
findAlertvizProcesses
for pid in $zpid
do
kill -9 ${pid}
echo "Killing 'alertviz.sh' process with pid ${pid}." >> ${HOME}/vizUtility.log
echo "Attempting to kill 'alertviz' process with pid ${pid}." >> ${HOME}/vizUtility.log
kill ${pid} 2>> ${HOME}/vizUtility.log
done
# Find the AlertViz process.
echo "Searching for the alertviz process." >> ${HOME}/vizUtility.log
for pid in `ps aux | grep [a]lertviz | awk '{print $2}'`;
findCaveProcesses
for pid in $zpid
do
kill -9 ${pid}
echo "Killing 'alertviz' process with pid ${pid}." >> ${HOME}/vizUtility.log
echo "Attempting to kill 'cave' process with pid ${pid}." >> ${HOME}/vizUtility.log
kill ${pid} 2>> ${HOME}/vizUtility.log
done
echo "FINISHED" >> ${HOME}/vizUtility.log
exit 0
# Second let's be resolute in our assurances that these processes are killed.
# Please review the paperwork included in DR 16111 for an unabridged explanation.
findAlertvizShProcesses
# Lets loop until we are sure all the alertviz.sh processes are killed or we
# have looped too many times.
ntoomany=2002
while [[ $npid -ne 0 && $ntoomany -ne 0 ]]
do
for pid in $zpid
do
echo "Attempting to kill 'alertviz.sh' process with pid ${pid}." >> ${HOME}/vizUtility.log
kill -9 ${pid} 2>> ${HOME}/vizUtility.log
done
npid=0
((ntoomany-=1))
if [ $ntoomany -le 1 ]
then
echo "The kill alertviz portion of this script $0 has been unable preform its duties. 02" >> ${HOME}/vizUtility.log
break
fi
sleep 1
findAlertvizShProcesses
done
# Let's give the SIGTERM a chance if it has not had enough time yet.
sleep 1
findAlertvizProcesses
for pid in $zpid
do
echo "Attempting to kill 'alertviz' process with pid ${pid}." >> ${HOME}/vizUtility.log
kill -9 ${pid} 2>> ${HOME}/vizUtility.log
done
findCaveProcesses
for pid in $zpid
do
echo "Attempting to kill 'cave' process with pid ${pid}." >> ${HOME}/vizUtility.log
kill -9 ${pid} 2>> ${HOME}/vizUtility.log
done
date >> ${HOME}/vizUtility.log
echo >> ${HOME}/vizUtility.log

View file

@ -172,9 +172,9 @@ import com.vividsolutions.jts.geom.Point;
* Jun 27, 2013 2152 njensen More thorough disposeInternal()
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
* Jul 17, 2013 2197 njensen Improved speed of getName()
* Oct 18, 2013 DR 16151 gzhang Used getAverageValue() for QPF Graph.
*
* </pre>
*
* @author dhladky
* @version 1.0
*/
@ -3157,9 +3157,9 @@ public class FFMPResource extends
getDataKey(), null, oldestRefTime, FFMPRecord.ALL,
basinPfaf);
Float qpfFloat = qpfBasin.getValue(monitor.getQpfWindow()
.getBeforeTime(), monitor.getQpfWindow().getAfterTime());
//Float qpfFloat = qpfBasin.getValue(monitor.getQpfWindow()
//.getBeforeTime(), monitor.getQpfWindow().getAfterTime());
Float qpfFloat = qpfBasin.getAverageValue(monitor.getQpfWindow().getAfterTime(),monitor.getQpfWindow().getBeforeTime() ); // DR 16151
fgd.setQpfValue(qpfFloat);
ArrayList<Double> qpfTimes = new ArrayList<Double>();

View file

@ -224,6 +224,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 10/15/2012 1229 rferrel Changes for non-blocking HelpUsageDlg.
* 11/05/2012 15477 zhao Trim blank lines in text in Editor when check Syntax
* 01/09/2013 15528 zhao Modified saveFile() and restoreFile()
* 10/24/2013 16478 zhao add syntax check for extra '=' sign
*
* </pre>
*
@ -1973,6 +1974,13 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
.getSelectionIndex());
String bbb = editorTafTabComp.getBBB();
// DR166478
if ( toolName.equals("UseMetarForPrevailing") ) {
if ( checkBasicSyntaxError(true) ) {
return;
}
}
// Setup for python request
AvnSmartToolRequest req = new AvnSmartToolRequest();
req.setToolName(toolName);
@ -2037,6 +2045,105 @@ public class TafViewerEditorDlg extends CaveSWTDialog implements ITafSettable,
return editorComp;
}
/**
*
* @param doLogMessage
* @return true if error found, otherwise false
*/
private boolean checkBasicSyntaxError(boolean doLogMessage) {
String in = editorTafTabComp.getTextEditorControl().getText();
clearSyntaxErrorLevel();
st = editorTafTabComp.getTextEditorControl();
final Map<StyleRange, String> syntaxMap = new HashMap<StyleRange, String>();
st.addMouseTrackListener(new MouseTrackAdapter() {
@Override
public void mouseHover(MouseEvent e) {
st = editorTafTabComp.getTextEditorControl();
Point p = new Point(e.x, e.y);
try {
int offset = st.getOffsetAtLocation(p);
StyleRange[] srs = st.getStyleRanges();
StyleRange sr = null;
for (StyleRange range : srs) {
if (offset >= range.start
&& offset <= (range.start + range.length)) {
sr = range;
break;
}
}
if (sr != null) {
if (syntaxMap != null) {
st.setToolTipText(syntaxMap.get(sr));
}
} else {
st.setToolTipText(null);
}
} catch (Exception ex) {
st.setToolTipText(null);
}
}
});
int tafIndex = in.indexOf("TAF");
int equalSignIndex = in.indexOf("=");
int lastEqualSignIndex = equalSignIndex;
if ( tafIndex < 0 && equalSignIndex < 0 ) { // empty TAF
return false;
}
while (tafIndex > -1 || equalSignIndex > -1) {
if ( tafIndex == -1 || tafIndex > equalSignIndex ) {
int lineIndexOfFirstEqualSign = st.getLineAtOffset(lastEqualSignIndex);
int lineIndexOfSecondEqualSign = st.getLineAtOffset(equalSignIndex);
if ( lineIndexOfFirstEqualSign == lineIndexOfSecondEqualSign ) {
StyleRange sr = new StyleRange(lastEqualSignIndex,1,null,qcColors[3]);
String msg = "Syntax error: there is an extra '=' sign in this line";
syntaxMap.put(sr, msg);
st.setStyleRange(null);
st.setStyleRange(sr);
if (doLogMessage) {
msgStatComp.setMessageText(msg, qcColors[3].getRGB());
}
return true;
}
int startIndex = lastEqualSignIndex;
while ( !in.substring(startIndex,startIndex+1).matches("[A-Z]") && !in.substring(startIndex,startIndex+1).matches("[0-9]") ) {
startIndex++;
}
int length = 6;
if ( (equalSignIndex-startIndex) < 6 ) {
length = equalSignIndex-startIndex;
}
StyleRange sr = new StyleRange(startIndex,length,null,qcColors[3]);
String msg = "Syntax error: There is an extra '=' sign before this point, or 'TAF' is missing at beginning of TAF";
syntaxMap.put(sr, msg);
st.setStyleRange(null);
st.setStyleRange(sr);
if (doLogMessage) {
msgStatComp.setMessageText(msg, qcColors[3].getRGB());
}
return true;
}
tafIndex = in.indexOf("TAF", tafIndex+1);
lastEqualSignIndex = equalSignIndex;
equalSignIndex = in.indexOf("=", equalSignIndex+1);
}
return false;
}
private void syntaxCheck() {
// Assume editorTafTabComp is for the active tab.
st = editorTafTabComp.getTextEditorControl();

View file

@ -19,6 +19,7 @@
**/
package com.raytheon.viz.hydro.stationprofile;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
@ -65,6 +66,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
* 15 Jun 2010 4304 mpduff Added some null checks.
* 30 Nov 2011 11253 lbousaidi used List instead of TreeMap
* 29 Mar 2013 1790 rferrel Make dialog non-blocking.
* 23 Oct 2013 15183 wkwock Fix scales and value format
*
* </pre>
*
@ -327,7 +329,7 @@ public class StationProfileDlg extends CaveSWTDialog {
*/
private void calculateValues() {
double totalElevInc = Math.abs(stationProfData.getElevationFtMax())
+ Math.abs(stationProfData.getElevationFtMin());
- Math.abs(stationProfData.getElevationFtMin());
// Calculate the offset between the elevation points
double offsetDbl = totalElevInc / 5;
@ -608,6 +610,7 @@ public class StationProfileDlg extends CaveSWTDialog {
e.gc.setFont(font);
int fontHeight = (e.gc.getFontMetrics().getHeight());
int fontAveWidth = (e.gc.getFontMetrics().getAverageCharWidth());
DecimalFormat df = new DecimalFormat("#.##");
// List of label position objects
ArrayList<LabelPosition> labelList = new ArrayList<LabelPosition>();
@ -633,16 +636,17 @@ public class StationProfileDlg extends CaveSWTDialog {
// ----------------------------------------
// Draw 0 miles hash and label
e.gc.drawLine(PROFILE_CANVAS_WIDTH / 2, BOTTOM_Y_COORD,
/* e.gc.drawLine(PROFILE_CANVAS_WIDTH / 2, BOTTOM_Y_COORD,
PROFILE_CANVAS_WIDTH / 2, BOTTOM_Y_COORD + RIVER_MILES_HASH);
e.gc.drawString("0", PROFILE_CANVAS_WIDTH / 2 - fontAveWidth / 2,
BOTTOM_Y_COORD + RIVER_MILES_HASH + 3, true);
*/
// Draw 50 miles hash and label
int currMile = 50;
double maxMile = getMaxMile(stationList);
int currMile = (int) Math.ceil(getMinMile(stationList) / 50) * 50;
int x;
int y;
while (Double.compare(mileRange, currMile) > 0) {
while (maxMile > currMile) {
x = calcRiverMileXCoord(currMile);
e.gc.drawLine(x, BOTTOM_Y_COORD, x, BOTTOM_Y_COORD
@ -680,7 +684,6 @@ public class StationProfileDlg extends CaveSWTDialog {
if (stationList != null) {
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm MM/dd");
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
int i = 0;
for (Statprof station : stationList) {
// Skip gage if the river mile is not valid
@ -691,7 +694,6 @@ public class StationProfileDlg extends CaveSWTDialog {
e.gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_BLACK));
x = calcRiverMileXCoord(station.getId().getMile());
y = calcElevationYCoord(station.getId().getZd());
i++;
// hash mark at each site
e.gc.drawLine(x, y, x, y + POINT_HASH);
@ -743,7 +745,7 @@ public class StationProfileDlg extends CaveSWTDialog {
HydroDataReport rpt = allReports.get(station.getId().getLid());
if (rpt.getValue() != HydroConstants.MISSING_VALUE) {
label.append(rpt.getValue() + " - ");
label.append(df.format(rpt.getValue()) + " - ");
label.append(sdf.format(rpt.getValidTime()) + ")");
} else {
label.append("MSG/MSG)");
@ -946,8 +948,10 @@ public class StationProfileDlg extends CaveSWTDialog {
mileRange = 10;
}
double maxMile = getMaxMile(stationList);
int xCoord = (int) Math.round((ZERO_MILE_XCOORD + 2)
* (mileRange - riverMile) / mileRange);
* (maxMile - riverMile) / mileRange);
return xCoord;
}

View file

@ -4,7 +4,7 @@
<!-- Post Processor definitions for models containing grids needing to be
stitched together -->
<postProcessedModel>
<modelName>UKMET[0-9]{2}|ECMF[0-9]{2}|ENSEMBLE[0-9]{2}|AVN[0-9]{2}
<modelName>UKMET[0-9]{2}|ECMF[0-9]|ENSEMBLE[0-9]{2}|AVN[0-9]{2}
</modelName>
<processorName>EnsembleGridAssembler</processorName>
</postProcessedModel>

View file

@ -85,7 +85,6 @@ if [ "${2}" = "-nobinlightning" ]; then
fi
if [ "${1}" = "-python-qpid" ]; then
buildRPM "awips2"
buildRPM "awips2-python-qpid"
buildRPM "awips2-python"
buildRPM "awips2-python-cherrypy"
@ -116,15 +115,6 @@ if [ "${1}" = "-python-qpid" ]; then
exit 1
fi
#buildRPM "awips2-ant"
#unpackHttpdPypies
if [ $? -ne 0 ]; then
exit 1
fi
#buildRPM "awips2-httpd-pypies"
#buildRPM "awips2-java"
#buildRPM "awips2-ldm"
#buildRPM "awips2-tools"
buildRPM "awips2-python-shapely"
exit 0
@ -157,7 +147,6 @@ if [ "${1}" = "-delta" ]; then
exit 1
fi
buildRPM "awips2"
buildRPM "awips2-ncep-database"
buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server"
@ -173,7 +162,6 @@ if [ "${1}" = "-delta" ]; then
buildRPM "awips2-database-server-configuration"
buildRPM "awips2-database-standalone-configuration"
buildRPM "awips2-data.hdf5-gfe.climo"
buildRPM "awips2-hydroapps-shared"
buildRPM "awips2-localapps-environment"
buildRPM "awips2-maps-database"
buildRPM "awips2-notification"
@ -181,7 +169,6 @@ if [ "${1}" = "-delta" ]; then
buildRPM "awips2-data.hdf5-topo"
buildRPM "awips2-data.gfe"
buildRPM "awips2-rcm"
buildRPM "awips2-edex-environment"
buildLocalizationRPMs
if [ $? -ne 0 ]; then
exit 1
@ -222,8 +209,8 @@ if [ "${1}" = "-full" ]; then
buildRPM "awips2-python-werkzeug"
buildRPM "awips2-python-pygtk"
buildRPM "awips2-python-pycairo"
buildRPM "awips2-python-shapely"
buildRPM "awips2"
buildRPM "awips2-adapt-native"
buildRPM "awips2-aviation-shared"
buildRPM "awips2-cli"
@ -260,14 +247,11 @@ if [ "${1}" = "-full" ]; then
buildRPM "awips2-httpd-pypies"
buildJava
buildRPM "awips2-groovy"
#buildRPM "awips2-ldm"
buildRPM "awips2-postgres"
buildRPM "awips2-pgadmin3"
buildRPM "awips2-tools"
buildRPM "awips2-edex-environment"
buildRPM "awips2-openfire"
buildRPM "awips2-httpd-collaboration"
buildRPM "awips2-python-shapely"
exit 0
fi
@ -347,9 +331,6 @@ if [ "${1}" = "-ade" ]; then
fi
if [ "${1}" = "-viz" ]; then
buildRPM "awips2-common-base"
buildRPM "awips2-rcm"
buildRPM "awips2-hydroapps-shared"
buildCAVE
if [ $? -ne 0 ]; then
exit 1
@ -360,13 +341,9 @@ if [ "${1}" = "-viz" ]; then
fi
if [ "${1}" = "-edex" ]; then
buildRPM "awips2-common-base"
buildRPM "awips2-adapt-native"
buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server"
buildRPM "awips2-edex-environment"
# buildRPM "awips2-ncep-database"
# buildRPM "awips2-python-dynamicserialize"
buildEDEX
if [ $? -ne 0 ]; then
exit 1
@ -408,7 +385,18 @@ fi
# Use the custom flag for selecting specific rpms to build
if [ "${1}" = "-custom" ]; then
#buildRPM "awips2-ldm"
unpackHttpdPypies
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-httpd-pypies"
buildRPM "awips2-adapt-native"
buildRPM "awips2-hydroapps-shared"
buildRPM "awips2-common-base"
buildRPM "awips2-rcm"
#buildRPM "awips2-ant"
#buildRPM "awips2-java"
#buildRPM "awips2-tools"
exit 0
fi

View file

@ -1,423 +0,0 @@
#!/bin/bash
function buildRPM()
{
# Arguments:
# ${1} == the name of the rpm.
lookupRPM "${1}"
if [ $? -ne 0 ]; then
echo "ERROR: '${1}' is not a recognized AWIPS II RPM."
exit 1
fi
/usr/bin/rpmbuild -ba \
--define '_topdir %(echo ${AWIPSII_TOP_DIR})' \
--define '_baseline_workspace %(echo ${WORKSPACE})' \
--define '_uframe_eclipse %(echo ${UFRAME_ECLIPSE})' \
--define '_awipscm_share %(echo ${AWIPSCM_SHARE})' \
--define '_build_root %(echo ${AWIPSII_BUILD_ROOT})' \
--define '_component_version %(echo ${AWIPSII_VERSION})' \
--define '_component_release %(echo ${AWIPSII_RELEASE})' \
--define '_component_build_date %(echo ${COMPONENT_BUILD_DATE})' \
--define '_component_build_time %(echo ${COMPONENT_BUILD_TIME})' \
--define '_component_build_system %(echo ${COMPONENT_BUILD_SYSTEM})' \
--buildroot ${AWIPSII_BUILD_ROOT} \
${RPM_SPECIFICATION}/component.spec
if [ $? -ne 0 ]; then
echo "ERROR: Failed to build RPM ${1}."
exit 1
fi
return 0
}
# This script will build all of the 32-bit rpms.
# Ensure that we are on a machine with the correct architecture.
architecture=`uname -i`
if [ ! "${architecture}" = "i386" ]; then
echo "ERROR: This build can only be performed on a 32-bit Operating System."
exit 1
fi
# Determine which directory we are running from.
path_to_script=`readlink -f $0`
dir=$(dirname $path_to_script)
common_dir=`cd ${dir}/../common; pwd;`
if [ $? -ne 0 ]; then
echo "ERROR: Unable to find the common functions directory."
exit 1
fi
# source the common functions.
source ${common_dir}/lookupRPM.sh
if [ $? -ne 0 ]; then
echo "ERROR: Unable to source the common functions."
exit 1
fi
source ${common_dir}/usage.sh
if [ $? -ne 0 ]; then
echo "ERROR: Unable to source the common functions."
exit 1
fi
source ${common_dir}/rpms.sh
if [ $? -ne 0 ]; then
echo "ERROR: Unable to source the common functions."
exit 1
fi
source ${common_dir}/systemInfo.sh
if [ $? -ne 0 ]; then
echo "ERROR: Unable to retrieve the system information."
exit 1
fi
# prepare the build environment.
source ${dir}/buildEnvironment.sh
if [ $? -ne 0 ]; then
echo "ERROR: Unable to prepare the build environment."
exit 1
fi
export LIGHTNING=true
# Determine if the optional '-nobinlightning' argument has been specified.
if [ "${2}" = "-nobinlightning" ]; then
LIGHTNING=false
fi
if [ "${1}" = "-python-qpid" ]; then
buildRPM "awips2"
buildRPM "awips2-python-qpid"
buildRPM "awips2-python"
buildRPM "awips2-python-cherrypy"
buildRPM "awips2-python-dynamicserialize"
buildRPM "awips2-python-nose"
buildRPM "awips2-python-numpy"
buildRPM "awips2-python-h5py"
buildRPM "awips2-python-jimporter"
buildRPM "awips2-python-matplotlib"
buildRPM "awips2-python-pil"
buildRPM "awips2-python-pmw"
buildRPM "awips2-python-pupynere"
buildRPM "awips2-python-scientific"
buildRPM "awips2-python-scipy"
buildRPM "awips2-python-tables"
buildRPM "awips2-python-thrift"
buildRPM "awips2-python-tpg"
buildRPM "awips2-python-ufpy"
buildRPM "awips2-python-werkzeug"
buildRPM "awips2-python-pygtk"
buildRPM "awips2-python-pycairo"
if [ $? -ne 0 ]; then
exit 1
fi
buildQPID
if [ $? -ne 0 ]; then
exit 1
fi
#buildRPM "awips2-ant"
#unpackHttpdPypies
if [ $? -ne 0 ]; then
exit 1
fi
#buildRPM "awips2-httpd-pypies"
#buildRPM "awips2-java"
#buildRPM "awips2-ldm"
#buildRPM "awips2-tools"
buildRPM "awips2-python-shapely"
exit 0
fi
if [ "${1}" = "-postgres" ]; then
buildRPM "awips2-postgres"
buildRPM "awips2-database-server-configuration"
buildRPM "awips2-database-standalone-configuration"
buildRPM "awips2-database"
buildRPM "awips2-maps-database"
buildRPM "awips2-pgadmin3"
exit 0
fi
if [ "${1}" = "-delta" ]; then
buildCAVE
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-alertviz"
buildEDEX
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2"
buildRPM "Installer.ncep-database"
buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server"
buildRPM "awips2-python"
buildRPM "awips2-python-dynamicserialize"
buildRPM "awips2-python-ufpy"
buildRPM "awips2-python-qpid"
buildRPM "awips2-adapt-native"
buildRPM "awips2-aviation-shared"
buildRPM "awips2-cli"
buildRPM "awips2-database"
buildRPM "awips2-database-server-configuration"
buildRPM "awips2-database-standalone-configuration"
buildRPM "awips2-data.hdf5-gfe.climo"
buildRPM "awips2-hydroapps-shared"
buildRPM "awips2-localapps-environment"
buildRPM "awips2-maps-database"
buildRPM "awips2-notification"
buildRPM "awips2-pypies"
buildRPM "awips2-data.hdf5-topo"
buildRPM "awips2-data.gfe"
buildRPM "awips2-rcm"
buildRPM "awips2-edex-environment"
buildLocalizationRPMs
if [ $? -ne 0 ]; then
exit 1
fi
exit 0
fi
if [ "${1}" = "-full" ]; then
buildCAVE
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "Installer.ncep-database"
buildRPM "awips2-alertviz"
buildEDEX
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-python"
buildRPM "awips2-python-cherrypy"
buildRPM "awips2-python-dynamicserialize"
buildRPM "awips2-python-h5py"
buildRPM "awips2-python-jimporter"
buildRPM "awips2-python-matplotlib"
buildRPM "awips2-python-nose"
buildRPM "awips2-python-numpy"
buildRPM "awips2-python-pil"
buildRPM "awips2-python-pmw"
buildRPM "awips2-python-pupynere"
buildRPM "awips2-python-qpid"
buildRPM "awips2-python-scientific"
buildRPM "awips2-python-scipy"
buildRPM "awips2-python-tables"
buildRPM "awips2-python-thrift"
buildRPM "awips2-python-tpg"
buildRPM "awips2-python-ufpy"
buildRPM "awips2-python-werkzeug"
buildRPM "awips2-python-pygtk"
buildRPM "awips2-python-pycairo"
buildRPM "awips2"
buildRPM "awips2-adapt-native"
buildRPM "awips2-aviation-shared"
buildRPM "awips2-cli"
buildRPM "awips2-database"
buildRPM "awips2-database-server-configuration"
buildRPM "awips2-database-standalone-configuration"
buildRPM "awips2-data.hdf5-gfe.climo"
buildRPM "awips2-data.gfe"
buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server"
buildRPM "awips2-hydroapps-shared"
buildRPM "awips2-localapps-environment"
buildRPM "awips2-maps-database"
buildRPM "awips2-notification"
buildRPM "awips2-pypies"
buildRPM "awips2-data.hdf5-topo"
buildRPM "awips2-rcm"
buildLocalizationRPMs
if [ $? -ne 0 ]; then
exit 1
fi
buildQPID
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-ant"
unpackHttpdPypies
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-httpd-pypies"
buildRPM "awips2-java"
#buildRPM "awips2-ldm"
buildRPM "awips2-postgres"
buildRPM "awips2-pgadmin3"
buildRPM "awips2-tools"
buildRPM "awips2-edex-environment"
buildRPM "awips2-openfire"
buildRPM "awips2-httpd-collaboration"
buildRPM "awips2-python-shapely"
exit 0
fi
if [ "${1}" = "-ade" ]; then
buildRPM "awips2-eclipse"
buildRPM "awips2-java"
buildRPM "awips2-ant"
buildRPM "awips2-python"
buildRPM "awips2-python-cherrypy"
buildRPM "awips2-python-dynamicserialize"
buildRPM "awips2-python-h5py"
buildRPM "awips2-python-jimporter"
buildRPM "awips2-python-matplotlib"
buildRPM "awips2-python-nose"
buildRPM "awips2-python-numpy"
buildRPM "awips2-python-pil"
buildRPM "awips2-python-pmw"
buildRPM "awips2-python-pupynere"
buildRPM "awips2-python-qpid"
buildRPM "awips2-python-scientific"
buildRPM "awips2-python-scipy"
buildRPM "awips2-python-tables"
buildRPM "awips2-python-thrift"
buildRPM "awips2-python-tpg"
buildRPM "awips2-python-ufpy"
buildRPM "awips2-python-werkzeug"
buildRPM "awips2-python-pygtk"
buildRPM "awips2-python-pycairo"
buildRPM "awips2-python-shapely"
buildQPID -ade
if [ $? -ne 0 ]; then
exit 1
fi
# Package the ade.
# Create the containing directory.
ade_directory="awips2-ade-${AWIPSII_VERSION}-${AWIPSII_RELEASE}"
if [ -d ${WORKSPACE}/${ade_directory} ]; then
rm -rf ${WORKSPACE}/${ade_directory}
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir -p ${WORKSPACE}/${ade_directory}
if [ $? -ne 0 ]; then
exit 1
fi
# Copy the rpms to the directory.
cp -v ${AWIPSII_TOP_DIR}/RPMS/i386/* \
${AWIPSII_TOP_DIR}/RPMS/noarch/* \
${WORKSPACE}/${ade_directory}
if [ $? -ne 0 ]; then
exit 1
fi
awips2_ade_directory="${WORKSPACE}/rpms/awips2.ade"
# Copy the install and uninstall script to the directory.
cp -v ${awips2_ade_directory}/tar.ade/scripts/*.sh \
${WORKSPACE}/${ade_directory}
if [ $? -ne 0 ]; then
exit 1
fi
# Tar the directory.
pushd . > /dev/null 2>&1
cd ${WORKSPACE}
tar -cvf ${ade_directory}.tar ${ade_directory}
popd > /dev/null 2>&1
RC=$?
if [ ${RC} -ne 0 ]; then
exit 1
fi
exit 0
fi
if [ "${1}" = "-viz" ]; then
buildRPM "awips2"
buildRPM "awips2-rcm"
buildCAVE
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-alertviz"
exit 0
fi
if [ "${1}" = "-edex" ]; then
buildRPM "awips2"
buildRPM "awips2-cli"
buildRPM "awips2-gfesuite-client"
buildRPM "awips2-gfesuite-server"
buildRPM "Installer.ncep-database"
buildEDEX
if [ $? -ne 0 ]; then
exit 1
fi
exit 0
fi
if [ "${1}" = "-qpid" ]; then
buildQPID
if [ $? -ne 0 ]; then
exit 1
fi
exit 0
fi
if [ "${1}" = "-ldm" ]; then
buildRPM "awips2-ldm"
exit 0
fi
if [ "${1}" = "-package" ]; then
repository_directory="awips2-repository-${AWIPSII_VERSION}-${AWIPSII_RELEASE}"
if [ -d ${WORKSPACE}/${repository_directory} ]; then
rm -rf ${WORKSPACE}/${repository_directory}
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir -p ${WORKSPACE}/${repository_directory}/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
exit 1
fi
cp -r ${AWIPSII_TOP_DIR}/RPMS/* \
${WORKSPACE}/${repository_directory}/${AWIPSII_VERSION}-${AWIPSII_RELEASE}
if [ $? -ne 0 ]; then
exit 1
fi
rpms_directory="${WORKSPACE}/rpms"
comps_xml="${rpms_directory}/common/yum/arch.x86/comps.xml"
cp -v ${comps_xml} ${WORKSPACE}/${repository_directory}
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd ${WORKSPACE}
tar -cvf ${repository_directory}.tar ${repository_directory}
RC=$?
popd > /dev/null
if [ ${RC} -ne 0 ]; then
exit 1
fi
exit 0
fi
usage
exit 0