From d5dcfca1c331650310e8f8ea64385496747e044f Mon Sep 17 00:00:00 2001 From: sunxiaojian Date: Thu, 25 Feb 2021 15:46:32 +0800 Subject: [PATCH] chore: add script to generate Strings file --- convertAppJson.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 convertAppJson.sh diff --git a/convertAppJson.sh b/convertAppJson.sh new file mode 100755 index 000000000..ef3a05387 --- /dev/null +++ b/convertAppJson.sh @@ -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