Merge pull request #24 from tootsuite/feature/scripts

chore: add script to generate Strings file
This commit is contained in:
sxiaojian88 2021-02-25 17:06:04 +08:00 committed by GitHub
commit 96aab5848f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

26
update_localization.sh Executable file
View File

@ -0,0 +1,26 @@
#!/bin/zsh
SRCROOT=`pwd`
PODS_ROOT='Pods'
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}
echo "${PODS_ROOT}/SwiftGen/bin/swiftgen"
if [[ -f "${PODS_ROOT}/SwiftGen/bin/swiftgen" ]] then
"${PODS_ROOT}/SwiftGen/bin/swiftgen"
else
echo "Run 'pod install' or update your CocoaPods installation."
fi
#task4 clean temp file
rm -rf ${SRCROOT}/Localization/StringsConvertor/output
rm -rf ${SRCROOT}/Localization/StringsConvertor/intput