diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/update-boost.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/scripts/update-boost.sh b/scripts/update-boost.sh new file mode 100755 index 0000000000..03df5569aa --- /dev/null +++ b/scripts/update-boost.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -eu + +pushd "$BOOST" +if [ ! -f dist/bin/bcp ]; then + # Build bcp + ./bootstrap.sh + ./b2 tools/bcp +fi +popd + +# Extract boost modules that we need +rm -rf vendor/boost/include +mkdir -p vendor/boost/include +"$BOOST/dist/bin/bcp" --boost="$BOOST" --scan $(find {src,include,test,platform,bin} -name "*.cpp" -o -name "*.hpp") vendor/boost/include + +pushd vendor/boost +VERSION=$(sed -n 's/^#define BOOST_LIB_VERSION "\([^"]*\)"$/\1/p' include/boost/version.hpp) +echo "libboost ${VERSION/_/.} for Mapbox GL Native" > README.md +git add README.md include +popd + +echo "If everything works, run:" +echo "" +echo " git -C vendor/boost checkout master" +echo " git -C vendor/boost commit -m \"update boost to ${VERSION/_/.}\"" +echo " git -C vendor/boost push" +echo " git add vendor/boost" +echo "" +echo "and commit." |