From 6b9c4a4e0f9d8506cdc60498fcfcfaedd1796a25 Mon Sep 17 00:00:00 2001 From: eehouse Date: Thu, 27 May 2010 02:58:08 +0000 Subject: [PATCH] shorten pattern to include multi-line elements (I should use xmlstarlet here but need to grok xslt); don't report as missing strings in the common file --- xwords4/android/scripts/add_strings.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xwords4/android/scripts/add_strings.sh b/xwords4/android/scripts/add_strings.sh index abe488b26..816ce8773 100755 --- a/xwords4/android/scripts/add_strings.sh +++ b/xwords4/android/scripts/add_strings.sh @@ -5,8 +5,10 @@ LOCALES=values check_add () { STRING=$1 for VALUES in $LOCALES; do - PAT=".*" - if [ ! -f "res/$VALUES/strings.xml" ]; then + PAT="" + if grep -q "$PAT" res/values/common_rsrc.xml; then + : + elif [ ! -f "res/$VALUES/strings.xml" ]; then echo "error: res/$VALUES/strings.xml not found" 1>&2 elif ! grep -q "$PAT" res/$VALUES/strings.xml; then echo "$STRING"