diff options
Diffstat (limited to 'files/translation_migration.sh')
-rw-r--r-- | files/translation_migration.sh | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/files/translation_migration.sh b/files/translation_migration.sh index bf5a33ca..0b4b2ccc 100644 --- a/files/translation_migration.sh +++ b/files/translation_migration.sh @@ -1,24 +1,20 @@ #!/usr/bin/env bash +MODULE=Frost-for-Facebook + cd .. current=${PWD##*/} -if [ "$current" != "Frost-for-Facebook" ]; then - echo "Not in Frost"; +if [ "$current" != "$MODULE" ]; then + echo "Not in $MODULE"; return; fi -declare -a folders=("es" "fr" "de") +# DANGEROUS! Removes all files matching regex + +egrep -lir --include="*.xml" "<resources.*></resources>" "./" | tr '\n' '\0' | xargs -0 -n1 rm -cd app/src/main/res +# Delete empty directories -for d in $(find ./values-* -type d) ; do - key=$(echo $d | cut -d '-' -f2) - - if ! [[ ${folders[*]} =~ "$key" ]]; then - rm -r "$d" - else - mv "$d" "./values-$key" - fi -done
\ No newline at end of file +find . -type d -empty -delete
\ No newline at end of file |