install_boost.sh 618 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#! /bin/bash

set -e
set -x

ROOT=${PWD}

if [ ! -d install/ ]; then
   mkdir -p install
fi
cd install

#install current boost version
if [ ! -d boost ]; then
   curl -o boost.tar.gz "http://netcologne.dl.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.gz"
   mkdir boost_tmp
   tar --strip-components=1 -xf boost.tar.gz -C boost_tmp
   rm boost.tar.gz
   cd boost_tmp
   ./bootstrap.sh --prefix=${ROOT}/install/boost --with-libraries=system,iostreams,filesystem,program_options,date_time
   ./b2 -s NO_BZIP2=1 cxxflags="-std=c++11" --build-type=minimal install
   cd ${ROOT}/install
   rm -rf boost_tmp
fi