diff --git a/update_localization.sh b/update_localization.sh new file mode 100755 index 000000000..b1c16c025 --- /dev/null +++ b/update_localization.sh @@ -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