Issue #2038 Fixes for 13.5.1 delta scripts
Former-commit-id:4f112968dd
[formerly0ac8d01147
] [formerly660ca8fcec
] [formerly4f112968dd
[formerly0ac8d01147
] [formerly660ca8fcec
] [formerlybac07c65a1
[formerly660ca8fcec
[formerly 41ead90acf0d06e959e513e5a25869eb6e18150a]]]] Former-commit-id:bac07c65a1
Former-commit-id:a1b0b399a9
[formerly7c11dea797
] [formerly bede60a174f734fd8be3cff1da228268a9551c43 [formerlyec3e8b6411
]] Former-commit-id: 116850bed663cea0cef9ee792538f13f2a182c5b [formerly7c145f4fe9
] Former-commit-id:dc5522e6ab
This commit is contained in:
parent
2dd9c9dcbe
commit
be06196084
4 changed files with 87 additions and 17 deletions
23
deltaScripts/13.5.1/changeDataTypeEnumToUppercase.sh
Normal file
23
deltaScripts/13.5.1/changeDataTypeEnumToUppercase.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
SQL_SCRIPT="changeDataTypeEnumToUppercase.sql"
|
||||
|
||||
# ensure that the sql script is present
|
||||
if [ ! -f ${SQL_SCRIPT} ]; then
|
||||
echo "ERROR: the required sql script - ${SQL_SCRIPT} was not found."
|
||||
echo "FATAL: the update has failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: update started - changing DataType to an Uppercase enum"
|
||||
|
||||
# run the update
|
||||
/awips2/psql/bin/psql -U awips -d metadata -f ${SQL_SCRIPT}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FATAL: the update has failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: the update has completed successfully!"
|
||||
|
||||
exit 0
|
32
deltaScripts/13.5.1/changeDataTypeEnumToUppercase.sql
Normal file
32
deltaScripts/13.5.1/changeDataTypeEnumToUppercase.sql
Normal file
|
@ -0,0 +1,32 @@
|
|||
/**
|
||||
* 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.
|
||||
**/
|
||||
\set ON_ERROR_STOP 1
|
||||
\connect metadata;
|
||||
|
||||
-- Start a transaction
|
||||
BEGIN;
|
||||
|
||||
-- Update dataSetType="Grid" references to dataSetType="GRID"
|
||||
update ebxml.value set stringvalue = regexp_replace(stringvalue, 'dataSetType="Grid"', 'dataSetType="GRID"', 'g');
|
||||
-- Update dataType="Grid" references to dataType="GRID"
|
||||
update ebxml.value set stringvalue = regexp_replace(stringvalue, 'dataType="Grid"', 'dataType="GRID"', 'g');
|
||||
|
||||
-- Commit the transaction
|
||||
END;
|
|
@ -8,23 +8,7 @@ if [ ! -f ${XSLT_SCRIPT} ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: update started - updating ProviderType to be a class proper"
|
||||
|
||||
# Update subscription manager configuration files
|
||||
for FILE in `find /awips2/edex/data/utility/common_static -iname \*-harvester.xml`
|
||||
do
|
||||
cp $FILE $FILE.bak
|
||||
xsltproc ${XSLT_SCRIPT} ${FILE}.bak > ${FILE}
|
||||
|
||||
# Make sure each command succeeds
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FATAL: the update has failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Delete the md5 file
|
||||
rm $FILE.md5
|
||||
done
|
||||
echo "INFO: update started - updating ProviderType to be a class proper in the database"
|
||||
|
||||
# Dump the provider rows from the database for modification
|
||||
PROVIDER_ROWS=/tmp/provider_rows.tmp
|
31
deltaScripts/13.5.1/updateProviderTypeLocalization.sh
Normal file
31
deltaScripts/13.5.1/updateProviderTypeLocalization.sh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/bash
|
||||
|
||||
XSLT_SCRIPT="updateProviderType.xsl"
|
||||
# ensure that the xslt script is present
|
||||
if [ ! -f ${XSLT_SCRIPT} ]; then
|
||||
echo "ERROR: the required xslt script - ${XSLT_SCRIPT} was not found."
|
||||
echo "FATAL: the update has failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: update started - updating ProviderType to be a class proper in localization files"
|
||||
|
||||
# Update subscription manager configuration files
|
||||
for FILE in `find /awips2/edex/data/utility/common_static -iname \*-harvester.xml`
|
||||
do
|
||||
cp $FILE $FILE.bak
|
||||
xsltproc ${XSLT_SCRIPT} ${FILE}.bak > ${FILE}
|
||||
|
||||
# Make sure each command succeeds
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "FATAL: the update has failed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Delete the md5 file
|
||||
rm $FILE.md5
|
||||
done
|
||||
|
||||
echo "INFO: the update has completed successfully!"
|
||||
|
||||
exit 0
|
Loading…
Add table
Reference in a new issue