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
|