2021-02-25 08:46:32 +01:00
|
|
|
#!/bin/zsh
|
|
|
|
|
2021-08-06 09:47:03 +02:00
|
|
|
set -ev
|
|
|
|
|
2021-02-25 08:46:32 +01:00
|
|
|
SRCROOT=`pwd`
|
2021-02-25 09:50:37 +01:00
|
|
|
PODS_ROOT='Pods'
|
|
|
|
|
2021-02-25 08:46:32 +01:00
|
|
|
echo ${SRCROOT}
|
2021-08-06 09:47:03 +02:00
|
|
|
|
|
|
|
# task 1 generate strings file
|
2021-02-25 08:46:32 +01:00
|
|
|
cd ${SRCROOT}/Localization/StringsConvertor
|
|
|
|
sh ./scripts/build.sh
|
|
|
|
|
2021-08-06 09:47:03 +02:00
|
|
|
# task 2 copy strings file
|
2022-01-27 14:23:39 +01:00
|
|
|
cp -R ${SRCROOT}/Localization/StringsConvertor/output/module/ ${SRCROOT}/MastodonSDK/Sources/MastodonLocalization/Resources
|
2021-08-06 09:47:03 +02:00
|
|
|
cp -R ${SRCROOT}/Localization/StringsConvertor/Intents/output/ ${SRCROOT}/MastodonIntent
|
2021-02-25 08:46:32 +01:00
|
|
|
|
2021-08-06 09:47:03 +02:00
|
|
|
# task 3 swiftgen
|
2021-02-25 08:46:32 +01:00
|
|
|
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"
|
2021-02-25 08:46:32 +01:00
|
|
|
else
|
2021-02-25 09:50:37 +01:00
|
|
|
echo "Run 'pod install' or update your CocoaPods installation."
|
2021-02-25 08:46:32 +01:00
|
|
|
fi
|
|
|
|
|
2021-08-06 09:47:03 +02:00
|
|
|
#task 4 clean temp file
|
2021-02-25 08:46:32 +01:00
|
|
|
rm -rf ${SRCROOT}/Localization/StringsConvertor/output
|
2021-08-06 09:47:03 +02:00
|
|
|
rm -rf ${SRCROOT}/Localization/StringsConvertor/intents/output
|