From 5ca2fdf01438ca879dbda646ef7f7fe93e47c0e6 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Tue, 10 Dec 2019 15:54:23 +0300 Subject: build_boost_travis.sh -> build/boost/ --- build/boost/build_travis.sh | 51 +++++++++++++++++++++++++++++++++++++++++++++ build/build_boost_travis.sh | 51 --------------------------------------------- 2 files changed, 51 insertions(+), 51 deletions(-) create mode 100755 build/boost/build_travis.sh delete mode 100755 build/build_boost_travis.sh diff --git a/build/boost/build_travis.sh b/build/boost/build_travis.sh new file mode 100755 index 0000000..1491bc8 --- /dev/null +++ b/build/boost/build_travis.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +# Copyright (c) 2019 Egor Tensin +# This file is part of the "cmake-common" project. +# For details, see https://github.com/egor-tensin/cmake-common. +# Distributed under the MIT License. + +# This script is used during a Travis build to download and build Boost. +# Input: +# * environment variables $travis_boost_version, $configuration and $platform. +# Output: +# * unpacked Boost distribution at $HOME/boost_X_YY_Z, +# * built libraries at $HOME/boost_X_YY_Z/stage/$platform/${configuration,,}. + +set -o errexit -o nounset -o pipefail -o xtrace + +readonly base_dir="$HOME" +readonly boost_fs="boost_${travis_boost_version//\./_}" +readonly boost_url="https://dl.bintray.com/boostorg/release/$travis_boost_version/source/$boost_fs.tar.gz" +readonly boost_dir="$base_dir/$boost_fs" + +address_model=32 +[ "$platform" = x64 ] && address_model=64 +readonly address_model + +configuration="${configuration,,}" +readonly configuration + +download() { + cd -- "$base_dir" + wget --quiet -- "$boost_url" + tar xzvf "$boost_fs.tar.gz" > /dev/null +} + +build() { + cd -- "$boost_dir" + ./bootstrap.sh + + ./b2 \ + "address-model=$address_model" \ + variant="$configuration" \ + "--stagedir=stage/$platform/$configuration" \ + "$@" +} + +main() { + download + build "$@" +} + +main "$@" diff --git a/build/build_boost_travis.sh b/build/build_boost_travis.sh deleted file mode 100755 index 1491bc8..0000000 --- a/build/build_boost_travis.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2019 Egor Tensin -# This file is part of the "cmake-common" project. -# For details, see https://github.com/egor-tensin/cmake-common. -# Distributed under the MIT License. - -# This script is used during a Travis build to download and build Boost. -# Input: -# * environment variables $travis_boost_version, $configuration and $platform. -# Output: -# * unpacked Boost distribution at $HOME/boost_X_YY_Z, -# * built libraries at $HOME/boost_X_YY_Z/stage/$platform/${configuration,,}. - -set -o errexit -o nounset -o pipefail -o xtrace - -readonly base_dir="$HOME" -readonly boost_fs="boost_${travis_boost_version//\./_}" -readonly boost_url="https://dl.bintray.com/boostorg/release/$travis_boost_version/source/$boost_fs.tar.gz" -readonly boost_dir="$base_dir/$boost_fs" - -address_model=32 -[ "$platform" = x64 ] && address_model=64 -readonly address_model - -configuration="${configuration,,}" -readonly configuration - -download() { - cd -- "$base_dir" - wget --quiet -- "$boost_url" - tar xzvf "$boost_fs.tar.gz" > /dev/null -} - -build() { - cd -- "$boost_dir" - ./bootstrap.sh - - ./b2 \ - "address-model=$address_model" \ - variant="$configuration" \ - "--stagedir=stage/$platform/$configuration" \ - "$@" -} - -main() { - download - build "$@" -} - -main "$@" -- cgit v1.2.3