Skip to content

Commit

Permalink
Update cd in the bash scripts (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
testableapple authored Oct 26, 2023
1 parent 427b2b5 commit 7d719ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions Scripts/removeUnneededSymbols.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
Expand All @@ -44,7 +45,7 @@ function removeUnneededSymbols() {
fi
done

cd / >/dev/null
cd "$current_directory"
}

removeUnneededSymbols "ios-arm64"
Expand Down
6 changes: 4 additions & 2 deletions Scripts/updateDependency.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -43,7 +45,7 @@ git checkout $version

ensure_clean_git

cd -
cd "$current_directory"

echo "→ Copying source files"
rm -rf $output_directory
Expand Down

0 comments on commit 7d719ee

Please sign in to comment.