chore: add script to generate Strings file

This commit is contained in:
sunxiaojian 2021-02-25 15:46:32 +08:00
parent 6155b33451
commit d5dcfca1c3
1 changed files with 24 additions and 0 deletions

24
convertAppJson.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/zsh
SRCROOT=`pwd`
echo ${SRCROOT}
# task1 generate strings file
cd ${SRCROOT}/Localization/StringsConvertor
sh ./scripts/build.sh
# task2 copy strings file /Localization/StringsConvertor/output to /Mastodon/Resources
cp -r ${SRCROOT}/Localization/StringsConvertor/output/ ${SRCROOT}/Mastodon/Resources/
# task3 swiftgen
cd ${SRCROOT}
if command -v swiftgen >/dev/null 2>&1; then
swiftgen
else
echo "please install swiftgen by run brew install swiftgen"
fi
#task4 clean temp file
rm -rf ${SRCROOT}/Localization/StringsConvertor/output
rm -rf ${SRCROOT}/Localization/StringsConvertor/intput