diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-16 19:18:13 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-06-17 09:23:02 +0200 |
commit | ae677cb64b4456ee336bc62484cbf022e9d6493f (patch) | |
tree | 332274bcb21be495732ba17233bb8d98f65e47f9 | |
parent | 14ba56fd1a9e82206f964a8830953a1b51eecbdd (diff) | |
download | searxng-ae677cb64b4456ee336bc62484cbf022e9d6493f.tar.gz searxng-ae677cb64b4456ee336bc62484cbf022e9d6493f.zip |
[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>
-rwxr-xr-x | manage | 11 | ||||
-rwxr-xr-x | utils/searx.sh | 17 |
2 files changed, 20 insertions, 8 deletions
@@ -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 $? diff --git a/utils/searx.sh b/utils/searx.sh index e1ff4beb0..69068b914 100755 --- a/utils/searx.sh +++ b/utils/searx.sh @@ -51,7 +51,8 @@ shellcheck" BUILD_PACKAGES_debian="\ firefox graphviz imagemagick texlive-xetex librsvg2-bin texlive-latex-recommended texlive-extra-utils fonts-dejavu -latexmk fontforge ttfautohint" +latexmk fontforge ttfautohint +npm" # pacman packages SEARX_PACKAGES_arch="\ @@ -62,7 +63,8 @@ shellcheck" BUILD_PACKAGES_arch="\ firefox graphviz imagemagick texlive-bin extra/librsvg -texlive-core texlive-latexextra ttf-dejavu fontforge ttfautohint" +texlive-core texlive-latexextra ttf-dejavu fontforge ttfautohint +npm" # dnf packages SEARX_PACKAGES_fedora="\ @@ -75,9 +77,16 @@ BUILD_PACKAGES_fedora="\ firefox graphviz graphviz-gd ImageMagick librsvg2-tools texlive-xetex-bin texlive-collection-fontsrecommended texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts -dejavu-sans-mono-fonts fontforge ttfautohint" +dejavu-sans-mono-fonts fontforge ttfautohint +npm" # yum packages +# +# hint: We do no longer support yum packages, it is to complex to maintain +# automate installation of packages like npm. In the firts step we ignore +# CentOS-7 as developer & build platform (the inital patch which brought +# CentOS-7 supports was not intended to be a developer platform). + SEARX_PACKAGES_centos="\ python36 python36-pip python36-lxml python-babel uwsgi uwsgi-plugin-python3 @@ -88,7 +97,7 @@ BUILD_PACKAGES_centos="\ firefox graphviz graphviz-gd ImageMagick librsvg2-tools texlive-xetex-bin texlive-collection-fontsrecommended texlive-collection-latex dejavu-sans-fonts dejavu-serif-fonts -dejavu-sans-mono-fonts fontforge ttfautohint" +dejavu-sans-mono-fonts" case $DIST_ID-$DIST_VERS in ubuntu-16.04|ubuntu-18.04) |