File: bootstrap

package info (click to toggle)
idjc 0.9.11-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,900 kB
  • sloc: python: 22,118; ansic: 16,761; sh: 5,650; makefile: 208; sed: 16
file content (39 lines) | stat: -rwxr-xr-x 840 bytes parent folder | download
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
#!/bin/sh

missing() {
    echo "'$1' is missing - please install it and try again"
    exit 1
}

executables() {
    for i in $* ; do
        j=$(echo $i | cut -d "/" -f1)
        k=$(echo $i | cut -d "/" -f2)
        which $j 1>/dev/null 2>/dev/null || which $k 1>/dev/null 2>/dev/null || missing $i
    done
}

python_modules() {
    for i in $* ; do
        python -c "import $i" 1>/dev/null 2>/dev/null || missing "python module '$i'"
    done
}

executables autoreconf libtool autopoint make

if test -d docsrc; then
    # we need to check these if the docsrc directory is present
    executables magick/convert
    python_modules pygments
fi

echo "remaking missing files in build environment"

# the docsrc directory exists in git source only
if test -d docsrc; then
    cd docsrc
    make && make doc
    cd ..
fi

autoreconf -ifs