Omaha #5116 - maintain CAVE-plugin localization post-deployment.
Change-Id: Ifb3c694e5bc140ff88ed670896d7893b09dcab77 Former-commit-id: cd5b25b620430ac71a42915be3180f45b7f902c4
This commit is contained in:
parent
05d66de1c9
commit
a84f27060f
4 changed files with 43 additions and 1 deletions
|
@ -109,5 +109,11 @@ if [ $? -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Relocate localization files.
|
||||
/bin/bash /awips2/cave/relocateLocalization.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Successfully installed feature: ${feature_id}."
|
||||
exit 0
|
||||
exit 0
|
|
@ -73,4 +73,11 @@ for feature in `cat ${_output}`; do
|
|||
fi
|
||||
done
|
||||
|
||||
# Relocate localization files.
|
||||
/bin/bash /awips2/cave/relocateLocalization.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "INFO: Upgrades Finished."
|
||||
exit 0
|
23
cave/build/static/linux/cave/relocateLocalization.sh
Normal file
23
cave/build/static/linux/cave/relocateLocalization.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Post-installation script that copies the unpacked localization files
|
||||
# to /awips2/cave/etc.
|
||||
|
||||
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 -rf ${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
|
|
@ -158,6 +158,12 @@ if [ ! "`hostname | cut -b 1-2`" = "xt" ]; then
|
|||
rm -f /etc/xdg/autostart/awips2-textws.desktop
|
||||
fi
|
||||
|
||||
# relocate any localization files installed by awips2-cave
|
||||
/bin/bash /awips2/cave/relocateLocalization.sh
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
%preun
|
||||
%postun
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue