awips2/deltaScripts/14.2.1/moveStyleRules.sh
Brian Clements 9291d684ab Issue #2404 added upgrade script to move style rules
Former-commit-id: 2fe6db57ff [formerly 480605251a] [formerly 5c3a995fad] [formerly 2fe6db57ff [formerly 480605251a] [formerly 5c3a995fad] [formerly 2ebc09493a [formerly 5c3a995fad [formerly c6b890c59cdc5d831358f3d908533cc1ecf2cec9]]]]
Former-commit-id: 2ebc09493a
Former-commit-id: 1e3b3868c6 [formerly 1dc301acd0] [formerly f194e1c3c80a443fa6a811b28b45cc1803a644c8 [formerly 788e95f6d1]]
Former-commit-id: 95049c7ff1d632548a963225d5db1a144d7438cb [formerly 72b5f0927a]
Former-commit-id: 86ad359c34
2013-09-27 11:16:35 -05:00

25 lines
659 B
Bash

#!/bin/bash
# This script will move any non-base style rules from cave_static to common_static.
#
# This update is required with 14.2.1.
#
# This update is only for edex servers which host the cave localization files
#
echo "INFO: Moving all style rules to common_static."
IFS=$'\n'
commonFiles=`find /awips2/edex/data/utility/cave_static/*/*/styleRules/ -iname '*.xml'`
for f in $commonFiles; do
newf=${f//cave_static/common_static}
if [ -e "$newf" ]; then
echo Cannot upgrade $f because $newf already exists
else
mkdir -p `dirname $newf`
mv "$f" "$newf"
fi
done
echo "INFO: The update finished successfully."
exit 0