From 0d56f4ba9c3f7ec435d408d1085b9cd16a3c214d Mon Sep 17 00:00:00 2001 From: Marc-Antoine Fortier Date: Fri, 10 Nov 2023 11:49:34 -0500 Subject: [PATCH] Fix boilerplate setup script replacing false positives (#49) --- boilerplate-setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/boilerplate-setup.sh b/boilerplate-setup.sh index b5c9be2..2426ff3 100755 --- a/boilerplate-setup.sh +++ b/boilerplate-setup.sh @@ -19,6 +19,7 @@ content=$(find . -type f \( \ -name "*.plist" -or \ -name "*.pbxproj" \ \) \ + -and ! -path "./build/*" \ -and ! -path "./boilerplate-setup.sh" \ -and ! -path "./.idea/*" \ -and ! -path "./.git/*" \ @@ -95,7 +96,9 @@ success "Done!\n" header "Updating iOS Framework name..." frameworkName="Shared" for file in $content; do - run "/usr/bin/sed -i .bak s/$frameworkName/$FRAMEWORK_NAME/g $file" + if [[ $file != *.kt ]]; then + run "/usr/bin/sed -i .bak s/$frameworkName/$FRAMEWORK_NAME/g $file" + fi done mv shared/"${frameworkName}".podspec shared/"${FRAMEWORK_NAME}".podspec success "Done!\n"