[enh] ./manage node.env - check build tools first

The node.env build environment require npm, ttfautohint and fontforge installed
in the OS.  These tools can be installed by::

    sudo -H ./utils/searx.sh install buildhost

If one of the tools is not installed, the script node.env stops with a
appropriate message.

BTW: We ignore CentOS-7 as developer & build platform

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
This commit is contained in:
Markus Heiser 2021-06-16 19:18:13 +02:00
parent 14ba56fd1a
commit ae677cb64b
2 changed files with 20 additions and 8 deletions

11
manage
View file

@ -295,15 +295,18 @@ gecko.driver() {
}
node.env() {
# shellcheck disable=SC2230
which npm &> /dev/null || die 1 'node.env - npm is not found!'
if ! required_commands npm fontforge ttfautohint; then
info_msg "to install build tools use::"
info_msg " sudo -H ./utils/searx.sh install buildhost"
die 1 "install needed build tools first"
fi
( set -e
build_msg INSTALL "theme: oscar"
build_msg INSTALL "searx/static/themes/oscar/package.json"
npm --prefix searx/static/themes/oscar install
build_msg INSTALL "theme: simple"
build_msg INSTALL "searx/static/themes/simple/package.json"
npm --prefix searx/static/themes/simple install
)
dump_return $?