From f911aa94328f42871c5b997b4e51c94c7d4ebda4 Mon Sep 17 00:00:00 2001 From: woxtu Date: Thu, 7 Mar 2024 01:12:34 +0900 Subject: [PATCH] Fix localization update script --- update_localization.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/update_localization.sh b/update_localization.sh index 1a240c893..f30e8e4e6 100755 --- a/update_localization.sh +++ b/update_localization.sh @@ -2,14 +2,13 @@ set -ev -SRCROOT=`pwd` -PODS_ROOT='Pods' +SRCROOT=$(pwd) echo ${SRCROOT} # Task 1 # here we use the template source as input to -# generate strings so we could use new strings +# generate strings so we could use new strings # before sync to Crowdin # clean Base.lproj @@ -31,11 +30,10 @@ cp -R ${SRCROOT}/Localization/StringsConvertor/Intents/output/ ${SRCROOT}/Mastod # Task 4 swiftgen cd ${SRCROOT} -echo "${PODS_ROOT}/SwiftGen/bin/swiftgen" -if [[ -f "${PODS_ROOT}/SwiftGen/bin/swiftgen" ]] then - "${PODS_ROOT}/SwiftGen/bin/swiftgen" +if which swiftgen >/dev/null; then + swiftgen else - echo "Run 'bundle exec pod install' or update your CocoaPods installation." + echo "Run 'brew install swiftgen'." fi # Task 5 clean temp file