Skip to content

Commit cc1c970

Browse files
committed
Hardcode version in update script
1 parent e6a980d commit cc1c970

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

third-party/update_boost_math.sh

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,27 @@
33
set -e # stop at the first error
44

55
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
6+
VERSION="1.89.0"
67

7-
echo "This script deletes ${SCRIPT_DIR}/boost-math and re-downloads it from the standalone Boost.Math release."
8+
echo "This script deletes ${SCRIPT_DIR}/boost-math and re-downloads it from the standalone Boost.Math release version ${VERSION}."
89
echo "It then subsets it so it only contains the parts that are used in libc++."
910
echo
10-
read -p "To continue, please enter the version you wish to download (e.g. 1.89.0), or Ctrl+C to cancel: " version
11-
12-
# Boost versions are always 1.xx.yy so far, use this to validate.
13-
# That will probably have to be updated at some point.
14-
if [[ "${version}" != "1."* ]]; then
15-
echo "Invalid version '${version}' provided, was expecting 1.XX.YY"
16-
exit 1
17-
fi
11+
read -p "Press a key to continue, or Ctrl+C to cancel"
1812

1913
echo "****************************************"
20-
echo "Downloading Boost.Math ${version}"
14+
echo "Downloading Boost.Math ${VERSION}"
2115
echo "****************************************"
22-
BOOST_URL="https://github.com/boostorg/math/archive/refs/tags/boost-${version}.tar.gz"
16+
BOOST_URL="https://github.com/boostorg/math/archive/refs/tags/boost-${VERSION}.tar.gz"
2317
function cleanup_tarball() {
24-
rm ${SCRIPT_DIR}/boost-math-${version}.tar.gz
18+
rm ${SCRIPT_DIR}/boost-math-${VERSION}.tar.gz
2519
}
2620
trap cleanup_tarball EXIT
27-
wget "${BOOST_URL}" -O ${SCRIPT_DIR}/boost-math-${version}.tar.gz
21+
wget "${BOOST_URL}" -O ${SCRIPT_DIR}/boost-math-${VERSION}.tar.gz
2822
rm -rf ${SCRIPT_DIR}/boost-math
2923
mkdir ${SCRIPT_DIR}/boost-math
30-
tar -x --file ${SCRIPT_DIR}/boost-math-${version}.tar.gz -C ${SCRIPT_DIR}/boost-math --strip-components=1
24+
tar -x --file ${SCRIPT_DIR}/boost-math-${VERSION}.tar.gz -C ${SCRIPT_DIR}/boost-math --strip-components=1
3125

3226
echo "****************************************"
33-
echo "Subsetting Boost.Math ${version}"
27+
echo "Subsetting Boost.Math ${VERSION}"
3428
echo "****************************************"
3529
rm -rf ${SCRIPT_DIR}/boost-math/{.circleci,.drone,.github,build,config,doc,example,meta,reporting,test,tools}

0 commit comments

Comments
 (0)