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

Former-commit-id: 46e40d4816 [formerly 13fe6c9677] [formerly b11cc68fb9] [formerly 46e40d4816 [formerly 13fe6c9677] [formerly b11cc68fb9] [formerly 0fe6f6c591 [formerly b11cc68fb9 [formerly 194bf8383e6b01f689500212413994c67449d1b7]]]]
Former-commit-id: 0fe6f6c591
Former-commit-id: c739504d85 [formerly a4af4a4856] [formerly 9419cce994fbb5fb682ebd497cc7b76d2171f780 [formerly 2c93afc923]]
Former-commit-id: c387ffa8f42e87f7d9b49c0353ab0f9ee5923074 [formerly cf86299e1c]
Former-commit-id: 08f4f74ad3
This commit is contained in:
Greg Armendariz 2013-10-07 14:50:02 -05:00 committed by Gerrit Code Review
commit ffb694a4b9

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