Ocelot-Social/maintenance/tools/merge-locales.sh

12 lines
272 B
Bash
Executable File

#!/bin/bash
for locale in locales/*.json; do
file=$(basename "$locale")
if [ -f "locales/tmp/$file" ]; then
jq -s '.[0] * .[1]' "$locale" "locales/tmp/$file" > locales/tmp/tmp.json
mv locales/tmp/tmp.json "$locale"
fi
done
rm -r locales/tmp/