Skip to content

Commit

Permalink
Use shasum on macOS, use = for POSIX compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjstewart committed Jul 13, 2024
1 parent 0148a4d commit 45f7c51
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/install_libspatialindex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ rm -f $VERSION.zip
curl -LOs --retry 5 --retry-max-time 120 https://github.com/libspatialindex/libspatialindex/archive/${VERSION}.zip

# check the file hash
echo "${SHA256} ${VERSION}.zip" | sha256sum -c -
if [ "$(uname)" = "Darwin" ]
then
echo "${SHA256} ${VERSION}.zip" | shasum -a 256 -c -
else
echo "${SHA256} ${VERSION}.zip" | sha256sum -c -
fi

rm -rf "libspatialindex-${VERSION}"
unzip -q $VERSION
Expand All @@ -43,7 +48,7 @@ cd build

printenv

if [ "$(uname)" == "Darwin" ]; then
if [ "$(uname)" = "Darwin" ]; then
CMAKE_ARGS="-D CMAKE_OSX_ARCHITECTURES=${ARCHFLAGS##* } \
-D CMAKE_INSTALL_RPATH=@loader_path"
fi
Expand Down

0 comments on commit 45f7c51

Please sign in to comment.