From 6431ddc873ff5a144841081d7c8c1c206a71101b Mon Sep 17 00:00:00 2001 From: Sergey Kopytov Date: Wed, 26 Jun 2019 19:08:05 +0300 Subject: [PATCH] add optional arguments for localizable strings script (pathes of scripts and texts json) --- xcode/build_phases/localization.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xcode/build_phases/localization.sh b/xcode/build_phases/localization.sh index d517aa4..e363844 100644 --- a/xcode/build_phases/localization.sh +++ b/xcode/build_phases/localization.sh @@ -1,5 +1,6 @@ LOCALIZATION_PATH="${PROJECT_NAME}/Resources/Localization" -STRINGS_FOLDER="common/strings" +#first argument set strings folder path +STRINGS_FOLDER=${1:-"common/strings"} if ! [ -e ${LOCALIZATION_PATH} ]; then echo "${PROJECT_DIR}/${LOCALIZATION_PATH} path does not exist. Add these folders and try again." @@ -11,4 +12,5 @@ if ! [ -e "${PROJECT_DIR}/${STRINGS_FOLDER}" ]; then exit 1 fi -php build-scripts/xcode/aux_scripts/import_strings.php ${PROJECT_NAME} ${STRINGS_FOLDER} +#second argument set strings script path +php ${2:-build-scripts/xcode/aux_scripts/import_strings.php} ${PROJECT_NAME} ${STRINGS_FOLDER}