diff --git a/Scripts/removeUnneededSymbols.sh b/Scripts/removeUnneededSymbols.sh index a944f9f8..2dea7081 100755 --- a/Scripts/removeUnneededSymbols.sh +++ b/Scripts/removeUnneededSymbols.sh @@ -26,8 +26,9 @@ output_directory=$2 function removeUnneededSymbols() { arch=$1 - path="$output_directory/$library.xcframework/$arch/BCSymbolMaps" - cd $path + current_directory=$(pwd) + + cd "$output_directory/$library.xcframework/$arch/BCSymbolMaps" # Looking for [...]/DerivedSources/[LIBRARY-NAME]_vers.c regex="(\/DerivedSources\/)([a-zA-Z_]*)(_vers.c)" @@ -44,7 +45,7 @@ function removeUnneededSymbols() { fi done - cd / >/dev/null + cd "$current_directory" } removeUnneededSymbols "ios-arm64" diff --git a/Scripts/updateDependency.sh b/Scripts/updateDependency.sh index 9feb9dfd..e71419e4 100755 --- a/Scripts/updateDependency.sh +++ b/Scripts/updateDependency.sh @@ -34,7 +34,9 @@ if ! [[ -d "$dependency_directory" ]]; then git clone $dependency_url $dependency_directory fi -cd $dependency_directory +current_directory=$(pwd) + +cd "$dependency_directory" ensure_clean_git @@ -43,7 +45,7 @@ git checkout $version ensure_clean_git -cd - +cd "$current_directory" echo "→ Copying source files" rm -rf $output_directory