From 2ebc09493a133111df66168042a955e4e941352d Mon Sep 17 00:00:00 2001 From: Brian Clements Date: Fri, 27 Sep 2013 11:16:35 -0500 Subject: [PATCH] Issue #2404 added upgrade script to move style rules Former-commit-id: c6b890c59cdc5d831358f3d908533cc1ecf2cec9 --- deltaScripts/14.2.1/moveStyleRules.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 deltaScripts/14.2.1/moveStyleRules.sh diff --git a/deltaScripts/14.2.1/moveStyleRules.sh b/deltaScripts/14.2.1/moveStyleRules.sh new file mode 100644 index 0000000000..2413848b2b --- /dev/null +++ b/deltaScripts/14.2.1/moveStyleRules.sh @@ -0,0 +1,25 @@ +#!/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