]> git.lyx.org Git - lyx.git/blob - 3rdparty/boost/extract.sh
Back to development
[lyx.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   "
18
19 if [ -z $1 ]
20 then
21     echo "Usage: extract.sh [--report] <path to new boost version>"
22     echo "Update our local boost copy"
23     echo "With --report, create a HTML report that contains in particular the dependencies"
24     exit 1
25 fi
26
27 if [ x$1 = x--report ]; then
28     bcp --boost=$2 --report $HEADERS report.html
29     exit 0;
30 fi
31
32
33 rm -rf needed
34 mkdir needed
35
36 bcp --boost=$1 $HEADERS needed/
37
38 # we do not use the provided MSVC project files
39 find needed -name '*.vcpro*' | xargs rm
40
41 # remove old boost code
42 rm -rf boost/*
43
44 # copy new headers
45 cp -vR needed/boost .
46
47 rm -rf needed
48
49