File: linuxdocs.sh

package info (click to toggle)
boost1.83 1.83.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 545,632 kB
  • sloc: cpp: 3,857,086; xml: 125,552; ansic: 34,414; python: 25,887; asm: 5,276; sh: 4,799; ada: 1,681; makefile: 1,629; perl: 1,212; pascal: 1,139; sql: 810; yacc: 478; ruby: 102; lisp: 24; csh: 6
file content (84 lines) | stat: -rwxr-xr-x 2,649 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#!/bin/bash

set -xe

export REPONAME=$(basename -s .git `git config --get remote.origin.url`)
export BOOST_SRC_FOLDER=$(git rev-parse --show-toplevel)

# Determine if running in boost-root
PARENTNAME=$(basename -s .git `git --git-dir ${BOOST_SRC_FOLDER}/../../.git config --get remote.origin.url`) || true
if [ -n "${PARENTNAME}" -a "${PARENTNAME}" = "boost" ]; then
    echo "Starting out inside boost-root"
    BOOSTROOTLIBRARY="yes"
else
    echo "Not starting out inside boost-root"
    BOOSTROOTLIBRARY="no"
fi


if git rev-parse --abbrev-ref HEAD | grep master ; then BOOST_BRANCH=master ; else BOOST_BRANCH=develop ; fi

echo '==================================> INSTALL'

sudo apt-get update
sudo apt-get install -y docbook docbook-xml docbook-xsl xsltproc libsaxonhe-java default-jre-headless flex libfl-dev bison unzip rsync wget python3 cmake build-essential

cd $BOOST_SRC_FOLDER
cd ..
mkdir -p tmp && cd tmp

if which doxygen; then
    echo "doxygen found"
else
    echo "building doxygen"
    if [ ! -d doxygen ]; then git clone -b 'Release_1_8_15' --depth 1 https://github.com/doxygen/doxygen.git && echo "not-cached" ; else echo "cached" ; fi
    cd doxygen
    cmake -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
    cd build
    sudo make install
    cd ../..
fi

if [ ! -f saxonhe.zip ]; then wget -O saxonhe.zip https://sourceforge.net/projects/saxon/files/Saxon-HE/9.9/SaxonHE9-9-1-4J.zip/download && echo "not-cached" ; else echo "cached" ; fi
unzip -d saxonhe -o saxonhe.zip
cd saxonhe
sudo rm /usr/share/java/Saxon-HE.jar || true
sudo cp saxon9he.jar /usr/share/java/Saxon-HE.jar

cd $BOOST_SRC_FOLDER

if [ "${BOOSTROOTLIBRARY}" = "yes" ]; then
    cd ../..
    git checkout $BOOST_BRANCH
    git pull
    export BOOST_ROOT=$(pwd)
else
    cd ..
    if [ ! -d boost-root ]; then
        git clone -b $BOOST_BRANCH https://github.com/boostorg/boost.git boost-root --depth 1
        cd boost-root
        export BOOST_ROOT=$(pwd)
        rsync -av $BOOST_SRC_FOLDER/ libs/$REPONAME
    else
        cd boost-root
        git checkout $BOOST_BRANCH
        git pull
        export BOOST_ROOT=$(pwd)
        rsync -av $BOOST_SRC_FOLDER/ libs/$REPONAME
    fi
fi

git submodule update --init libs/context
git submodule update --init tools/boostbook
git submodule update --init tools/boostdep
git submodule update --init tools/docca
git submodule update --init tools/quickbook
python3 tools/boostdep/depinst/depinst.py ../tools/quickbook
./bootstrap.sh
./b2 headers

echo '==================================> COMPILE'

echo "using doxygen ; using boostbook ; using saxonhe ;" > tools/build/src/user-config.jam

./b2 libs/$REPONAME/doc/