Merge "Issue #2033 - deploy the CAVE localization to the etc directory at installation time" into development

Former-commit-id: b11cc68fb9 [formerly 194bf8383e6b01f689500212413994c67449d1b7]
Former-commit-id: 0fe6f6c591
This commit is contained in:
Greg Armendariz 2013-10-07 14:50:02 -05:00 committed by Gerrit Code Review
commit 2c93afc923

View file

@ -186,6 +186,33 @@ cleanupUnzip
# Remove the backup.
rm -rf /awips2/cave.bak
# move localization files in unpacked plugins to the
# cave etc directory.
if [ ! -d /awips2/cave/etc ]; then
mkdir -p /awips2/cave/etc
if [ $? -ne 0 ]; then
exit 1
fi
fi
pushd . > /dev/null 2>&1
cd /awips2/cave/plugins
for localizationDirectory in `find . -maxdepth 2 -name localization -type d`;
do
# copy the contents of the localization directory to the
# etc directory.
cp -r ${localizationDirectory}/* /awips2/cave/etc
if [ $? -ne 0 ]; then
exit 1
fi
# remove the localization directory.
rm -rf ${localizationDirectory}
if [ $? -ne 0 ]; then
exit 1
fi
done
popd > /dev/null 2>&1
%preun
# Do not use p2 to remove the feature if this is an upgrade.
if [ "${1}" = "1" ]; then