aboutsummaryrefslogtreecommitdiff
path: root/files/translation_migration.sh
blob: bf5a33ca8f8f6a9e5949f7b44e68e5a27d548258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash

cd ..

current=${PWD##*/}

if [ "$current" != "Frost-for-Facebook" ]; then
    echo "Not in Frost";
    return;
fi

declare -a folders=("es" "fr" "de")

cd app/src/main/res

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