diff --git a/tools/macos-setup.sh b/tools/macos-setup.sh index 0dc5b627b0..31ec01b62d 100755 --- a/tools/macos-setup.sh +++ b/tools/macos-setup.sh @@ -2045,10 +2045,10 @@ uninstall_nghttp2() { install_libtiff() { if [ "$LIBTIFF_VERSION" -a ! -f tiff-$LIBTIFF_VERSION-done ] ; then echo "Downloading, building, and installing libtiff:" - [ -f tiff-$LIBTIFF_VERSION.tar.gz ] || curl -L -O https://download.osgeo.org/libtiff/tiff-$LIBTIFF_VERSION.tar.gz || exit 1 - if ! gzip -t tiff-$LIBTIFF_VERSION.tar.gz ; then - rm -f tiff-$LIBTIFF_VERSION.tar.gz && curl -L -O https://download.osgeo.org/libtiff/old/tiff-$LIBTIFF_VERSION.tar.gz || exit 1 - fi + [ -f tiff-$LIBTIFF_VERSION.tar.gz ] || + curl --fail -L -O https://download.osgeo.org/libtiff/tiff-$LIBTIFF_VERSION.tar.gz || + curl --fail -L -O https://download.osgeo.org/libtiff/old/tiff-$LIBTIFF_VERSION.tar.gz || + exit 1 $no_build && echo "Skipping installation" && return gzcat tiff-$LIBTIFF_VERSION.tar.gz | tar xf - || exit 1 cd tiff-$LIBTIFF_VERSION