Browse Source

remove_string.sh: helper for removing a string resource in all strings.xml files.

master
Reece H. Dunn 12 years ago
parent
commit
a91dedf205
1 changed files with 13 additions and 0 deletions
  1. 13
    0
      android/remove_string.sh

+ 13
- 0
android/remove_string.sh View File

#!/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 <string_id>

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

Loading…
Cancel
Save