Skip to content

Instantly share code, notes, and snippets.

@obfusk
Last active October 23, 2023 00:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save obfusk/1bccbe38d14b56dc0c63878144c6d8ce to your computer and use it in GitHub Desktop.
Save obfusk/1bccbe38d14b56dc0c63878144c6d8ce to your computer and use it in GitHub Desktop.
diff locales for catima
#!/bin/bash
diff -Naur \
<( sed -n '/name="locale_values"/,/string-array/p' < app/src/main/res/values/settings.xml \
| grep '<item>' | sed -r 's!.*>(.*)<.*!\1!' | sort | grep -v '^en$' ) \
<( ls app/src/main/res/values-* -d | sed 's!.*values-!!' | grep -Ev 'night|w600dp' ) \
| bat -p -l diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment