diff options
author | ardnew <andrew@ardnew.com> | 2022-01-27 15:16:54 -0600 |
---|---|---|
committer | ardnew <andrew@ardnew.com> | 2022-01-31 12:54:05 -0600 |
commit | d06e7bd0f61dc01d6f4049abe09e949642ef8fd1 (patch) | |
tree | a3acd8e15cc973a96a65435379b2f24c0fde54e0 | |
parent | 18edc17bf3b0b346d1a1f1ed324ee06e5e79feb7 (diff) |
macos-setup.sh: fix libtiff filename and URL
macos-setup.sh:
- Fix filename of libtiff in existence test from "libtiff" to "tiff"
- Added fallback URL for libtiff when the downloaded file is not a valid gzip
archive. The host rotates older versions of libtiff into an "old"
subdirectory, so curl downloads a 404 Web page and exits without error. Then
the call to gzcat fails with an invalid gzip archive error. Maybe libtiff
version should be updated instead?
-rwxr-xr-x | tools/macos-setup.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/macos-setup.sh b/tools/macos-setup.sh index 2c09f70f70..0dc5b627b0 100755 --- a/tools/macos-setup.sh +++ b/tools/macos-setup.sh @@ -2045,7 +2045,10 @@ uninstall_nghttp2() { install_libtiff() { if [ "$LIBTIFF_VERSION" -a ! -f tiff-$LIBTIFF_VERSION-done ] ; then echo "Downloading, building, and installing libtiff:" - [ -f libtiff-$LIBTIFF_VERSION.tar.gz ] || curl -L -O https://download.osgeo.org/libtiff/tiff-$LIBTIFF_VERSION.tar.gz || exit 1 + [ -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 $no_build && echo "Skipping installation" && return gzcat tiff-$LIBTIFF_VERSION.tar.gz | tar xf - || exit 1 cd tiff-$LIBTIFF_VERSION |