]> git.lyx.org Git - features.git/blob - 3rdparty/boost/extract.sh
Boost.lexical_cast is not needed anymore.
[features.git] / 3rdparty / boost / extract.sh
1 #!/bin/bash
2
3 #
4 # Script to extract only needed boost files using the bcp tool:
5 #
6 # http://www.boost.org/doc/libs/1_47_0/tools/bcp/doc/html/index.html
7 #
8 # Does also work with an outdated bcp version
9 #
10 # Usage: extract.sh <path to new boost version>
11 #
12
13 HEADERS="\
14   boost/any.hpp \
15   boost/assert.hpp \
16   boost/crc.hpp \
17   boost/signals2/signal.hpp \
18   "
19
20 if [ -z $1 ]
21 then
22     echo "Usage: extract.sh [--report] <path to new boost version>"
23     echo "Update our local boost copy"
24     echo "With --report, create a HTML report that contains in particular the dependencies"
25     exit 1
26 fi
27
28 if [ x$1 = x--report ]; then
29     bcp --boost=$2 --report $HEADERS report.html
30     exit 0;
31 fi
32
33
34 rm -rf needed
35 mkdir needed
36
37 bcp --boost=$1 $HEADERS needed/
38
39 # we do not use the provided MSVC project files
40 find needed -name '*.vcpro*' | xargs rm
41
42 # remove old boost headers
43 find boost -name \*.hpp | xargs rm
44
45 # copy new headers
46 cp -vR needed/boost .
47
48 rm -rf needed
49
50