2015-10-24 10:39:51 +00:00
|
|
|
#!/bin/bash
|
2011-10-23 11:08:16 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Script to extract only needed boost files using the bcp tool:
|
|
|
|
#
|
|
|
|
# http://www.boost.org/doc/libs/1_47_0/tools/bcp/doc/html/index.html
|
|
|
|
#
|
2020-11-29 18:20:55 +00:00
|
|
|
# Does also work with an outdated bcp version
|
2011-10-23 11:08:16 +00:00
|
|
|
#
|
2011-11-20 18:46:12 +00:00
|
|
|
# Usage: extract.sh <path to new boost version>
|
|
|
|
#
|
|
|
|
|
2020-12-10 11:13:02 +00:00
|
|
|
HEADERS="\
|
|
|
|
boost/any.hpp \
|
|
|
|
boost/assert.hpp \
|
|
|
|
boost/crc.hpp \
|
|
|
|
"
|
|
|
|
|
2011-11-20 18:46:12 +00:00
|
|
|
if [ -z $1 ]
|
|
|
|
then
|
2020-12-10 11:13:02 +00:00
|
|
|
echo "Usage: extract.sh [--report] <path to new boost version>"
|
|
|
|
echo "Update our local boost copy"
|
|
|
|
echo "With --report, create a HTML report that contains in particular the dependencies"
|
2011-11-20 18:46:12 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
2011-10-23 11:08:16 +00:00
|
|
|
|
2020-12-10 11:13:02 +00:00
|
|
|
if [ x$1 = x--report ]; then
|
|
|
|
bcp --boost=$2 --report $HEADERS report.html
|
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2011-10-23 11:08:16 +00:00
|
|
|
rm -rf needed
|
|
|
|
mkdir needed
|
|
|
|
|
2020-12-10 11:13:02 +00:00
|
|
|
bcp --boost=$1 $HEADERS needed/
|
2011-10-23 11:08:16 +00:00
|
|
|
|
2016-06-07 20:19:10 +00:00
|
|
|
# we do not use the provided MSVC project files
|
|
|
|
find needed -name '*.vcpro*' | xargs rm
|
|
|
|
|
2020-12-20 17:05:55 +00:00
|
|
|
# remove old boost code
|
|
|
|
rm -rf boost/*
|
2011-10-23 11:08:16 +00:00
|
|
|
|
2020-12-10 11:13:02 +00:00
|
|
|
# copy new headers
|
2011-10-23 11:08:16 +00:00
|
|
|
cp -vR needed/boost .
|
|
|
|
|
|
|
|
rm -rf needed
|
|
|
|
|
|
|
|
|