Skip to content

Commit 8c42427

Browse files
Deadpiklefaithfracture
authored andcommitted
Use bintray rather than sourceforge for downloads (#43)
* Use bintray rather than sourceforge for downloads * Check version before downloading from bintray * Fix indentation fail
1 parent c1a0691 commit 8c42427

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

boost.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,19 @@ cleanup()
507507

508508
#===============================================================================
509509

510+
# version() from https://stackoverflow.com/a/37939589/3938401
511+
version() { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
512+
510513
downloadBoost()
511514
{
515+
if [ $(version $BOOST_VERSION) -ge $(version "1.63.0") ]; then
516+
DOWNLOAD_SRC=https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/boost_${BOOST_VERSION2}.tar.bz2
517+
else
518+
DOWNLOAD_SRC=http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION2}.tar.bz2/download
519+
fi
512520
if [ ! -s "$BOOST_TARBALL" ]; then
513-
echo "Downloading boost ${BOOST_VERSION}"
514-
curl -L -o "$BOOST_TARBALL" \
515-
http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION2}.tar.bz2/download
521+
echo "Downloading boost ${BOOST_VERSION} from ${DOWNLOAD_SRC}"
522+
curl -L -o "$BOOST_TARBALL" "$DOWNLOAD_SRC"
516523
doneSection
517524
fi
518525
}

changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- 2019-09-20 --
2+
* Use bintray rather than sourceforge for downloads
3+
14
-- 2019-08-14 --
25
* Fixed my being stupid, doing bash arrays wrong, and breaking everyone
36

0 commit comments

Comments
 (0)