aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
Diffstat (limited to 'files')
-rw-r--r--files/translation_migration.sh20
1 files changed, 7 insertions, 13 deletions
diff --git a/files/translation_migration.sh b/files/translation_migration.sh
index cfdd470..0b26250 100644
--- a/files/translation_migration.sh
+++ b/files/translation_migration.sh
@@ -1,26 +1,20 @@
#!/usr/bin/env bash
-BASE_MODULE=kpref-activity
-FOLDER=values-de-rDE
-OUTPUT=values-de
+MODULE=KAU
cd ..
current=${PWD##*/}
-if [ "$current" != "KAU" ]; then
- echo "Not in KAU";
+if [ "$current" != "$MODULE" ]; then
+ echo "Not in $MODULE";
return;
fi
-mkdir -p about/src/main/res/${OUTPUT}
-mv ${BASE_MODULE}/src/main/res/${FOLDER}/strings_about.xml about/src/main/res/${OUTPUT}/strings_about.xml
+# DANGEROUS! Removes all files matching regex
-mkdir -p colorpicker/src/main/res/${OUTPUT}
-mv ${BASE_MODULE}/src/main/res/${FOLDER}/strings_colorpicker.xml colorpicker/src/main/res/${OUTPUT}/strings_colorpicker.xml
+egrep -lir --include="*.xml" "<resources.*></resources>" "./" | tr '\n' '\0' | xargs -0 -n1 rm
-mkdir -p core/src/main/res-public/${OUTPUT}
-mv ${BASE_MODULE}/src/main/res/${FOLDER}/strings_commons.xml core/src/main/res-public/${OUTPUT}/strings_commons.xml
+# Delete empty directories
-mkdir -p mediapicker/src/main/res/${OUTPUT}
-mv ${BASE_MODULE}/src/main/res/${FOLDER}/strings_mediapicker.xml mediapicker/src/main/res/${OUTPUT}/strings_mediapicker.xml \ No newline at end of file
+find . -type d -empty -delete \ No newline at end of file