From 6be8521bf6af383665f9d418f3e2d00a0fc68851 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Mon, 16 Mar 2020 12:51:40 +0300 Subject: [PATCH] depreacted BOOST_ROOT env variable --- images/linux/scripts/installers/boost.sh | 14 ++++++-------- images/linux/ubuntu1604.json | 3 +-- images/linux/ubuntu1804.json | 3 +-- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/images/linux/scripts/installers/boost.sh b/images/linux/scripts/installers/boost.sh index 673b1f61..9f8c9261 100644 --- a/images/linux/scripts/installers/boost.sh +++ b/images/linux/scripts/installers/boost.sh @@ -7,18 +7,16 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh +TOOLSET_PATH="$INSTALLER_SCRIPT_FOLDER/toolcache.json" BOOST_LIB=/usr/local/share/boost +BOOST_VERSIONS=$(cat toolset.json | jq -r 'to_entries[] | select(.key | match("boost")) | .value[] +".0"') # Install Boost -for BOOST_VERSION in ${BOOST_VERSIONS//,/ } +for BOOST_VERSION in ${BOOST_VERSIONS} do - BOOST_SYMLINK_VER=`echo "${BOOST_VERSION//[.]/_}"` - BOOST_ROOT="BOOST_ROOT_$BOOST_SYMLINK_VER" - - echo "$BOOST_ROOT=$BOOST_LIB/$BOOST_VERSION" | tee -a /etc/environment - if [[ $BOOST_VERSION == $BOOST_DEFAULT ]]; then - echo "BOOST_ROOT=$BOOST_LIB/$BOOST_VERSION" | tee -a /etc/environment - fi + BOOST_SYMLINK_VER=$(echo "${BOOST_VERSION//[.]/_}") + BOOST_ROOT_VERSION="BOOST_ROOT_$BOOST_SYMLINK_VER" + echo "$BOOST_ROOT_VERSION=$BOOST_LIB/$BOOST_VERSION" | tee -a /etc/environment DocumentInstalledItem "Boost C++ Libraries $BOOST_VERSION" done diff --git a/images/linux/ubuntu1604.json b/images/linux/ubuntu1604.json index 45b7386c..e604b058 100644 --- a/images/linux/ubuntu1604.json +++ b/images/linux/ubuntu1604.json @@ -240,8 +240,7 @@ "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "BOOST_VERSIONS=1.69.0", - "BOOST_DEFAULT=1.69.0" + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" }, diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index 4cf6f15b..6396229d 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -242,8 +242,7 @@ "environment_vars": [ "METADATA_FILE={{user `metadata_file`}}", "HELPER_SCRIPTS={{user `helper_script_folder`}}", - "BOOST_VERSIONS=1.69.0", - "BOOST_DEFAULT=1.69.0" + "INSTALLER_SCRIPT_FOLDER={{user `installer_script_folder`}}" ], "execute_command": "sudo sh -c '{{ .Vars }} {{ .Path }}'" },