mastodon-app-ufficiale-ipho.../update_localization.sh

30 lines
806 B
Bash
Raw Normal View History

#!/bin/zsh
set -ev
SRCROOT=`pwd`
2021-02-25 09:50:37 +01:00
PODS_ROOT='Pods'
echo ${SRCROOT}
# task 1 generate strings file
cd ${SRCROOT}/Localization/StringsConvertor
sh ./scripts/build.sh
# task 2 copy strings file
cp -R ${SRCROOT}/Localization/StringsConvertor/output/module/ ${SRCROOT}/MastodonSDK/Sources/MastodonLocalization/Resources
cp -R ${SRCROOT}/Localization/StringsConvertor/Intents/output/ ${SRCROOT}/MastodonIntent
# task 3 swiftgen
cd ${SRCROOT}
2021-02-25 09:50:37 +01:00
echo "${PODS_ROOT}/SwiftGen/bin/swiftgen"
if [[ -f "${PODS_ROOT}/SwiftGen/bin/swiftgen" ]] then
"${PODS_ROOT}/SwiftGen/bin/swiftgen"
else
echo "Run 'bundle exec pod install' or update your CocoaPods installation."
fi
#task 4 clean temp file
rm -rf ${SRCROOT}/Localization/StringsConvertor/output
rm -rf ${SRCROOT}/Localization/StringsConvertor/intents/output