From a32cf8c18e5034ccda966bb099ce7bb99fd2c6cf Mon Sep 17 00:00:00 2001 From: sunxiaojian Date: Thu, 25 Feb 2021 16:50:37 +0800 Subject: [PATCH] chore: use swiftgen from CococaPods --- update_localization.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/update_localization.sh b/update_localization.sh index ef3a0538..b1c16c02 100755 --- a/update_localization.sh +++ b/update_localization.sh @@ -1,6 +1,8 @@ #!/bin/zsh SRCROOT=`pwd` +PODS_ROOT='Pods' + echo ${SRCROOT} # task1 generate strings file cd ${SRCROOT}/Localization/StringsConvertor @@ -12,11 +14,11 @@ cp -r ${SRCROOT}/Localization/StringsConvertor/output/ ${SRCROOT}/Mastodon/Reso # task3 swiftgen cd ${SRCROOT} - -if command -v swiftgen >/dev/null 2>&1; then - swiftgen +echo "${PODS_ROOT}/SwiftGen/bin/swiftgen" +if [[ -f "${PODS_ROOT}/SwiftGen/bin/swiftgen" ]] then + "${PODS_ROOT}/SwiftGen/bin/swiftgen" else - echo "please install swiftgen by run brew install swiftgen" + echo "Run 'pod install' or update your CocoaPods installation." fi #task4 clean temp file