common.docker: Speed-up manylinux-x86 image build downloading CMake binary

x86 version of CMake compatible with Centos5 is now available at
https://github.com/dockbuild/CMake/releases
This commit is contained in:
Jean-Christophe Fillion-Robin
2018-06-09 14:14:19 -04:00
parent aa202df283
commit 2e1e18e187
2 changed files with 23 additions and 15 deletions

View File

@ -1,6 +1,22 @@
#!/bin/bash
set -ex
set -o pipefail
ARCH="x86_64"
while [ $# -gt 0 ]; do
case "$1" in
-32)
ARCH="x86"
;;
*)
echo "Usage: Usage: ${0##*/} [-32]"
exit 1
;;
esac
shift
done
if ! command -v curl &> /dev/null; then
echo >&2 'error: "curl" not found!'
@ -19,7 +35,7 @@ fi
cd /usr/src
CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-x86_64
CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-${ARCH}
url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz
echo "Downloading $url"
curl -# -LO $url