From a91dedf205975772ccf33f5e12a3662a99a66fa6 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Fri, 3 May 2013 14:54:10 +0100 Subject: [PATCH] remove_string.sh: helper for removing a string resource in all strings.xml files. --- android/remove_string.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 android/remove_string.sh diff --git a/android/remove_string.sh b/android/remove_string.sh new file mode 100755 index 00000000..7e5ce141 --- /dev/null +++ b/android/remove_string.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# +# Copyright (C) 2013 Reece H. Dunn +# License: GPLv3+ +# +# Helper utility for removing a string/string-list item in all string resources. +# +# Usage: ./remove_string.sh + +ls res/values*/strings.xml | while read STRINGS ; do + xmlstarlet ed -d "/resources/*[@name='${1}']" ${STRINGS} > /tmp/strings.xml + mv /tmp/strings.xml ${STRINGS} +done