| 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (C) 2013 Reece H. Dunn |
| 4 | # License: GPLv3+ |
| 5 | # |
| 6 | # Helper utility for removing a string/string-list item in all string resources. |
| 7 | # |
| 8 | # Usage: ./remove_string.sh <string_id> |
| 9 | |
| 10 | ls res/values*/strings.xml | while read STRINGS ; do |
| 11 | xmlstarlet ed -P -d "/resources/*[@name='${1}']" ${STRINGS} > /tmp/strings.xml |
| 12 | mv /tmp/strings.xml ${STRINGS} |
| 13 | done |