diff options
author | Alexandre Flament <alex@al-f.net> | 2021-11-23 20:18:09 +0100 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-11-28 20:05:37 +0100 |
commit | 59f4c792b498ef399dad5643576327da8ed122f2 (patch) | |
tree | 315bd7aa599b5b5543f0fed7f98bbebac9b6d0c0 /manage | |
parent | 8c4c4259d4f9a856c8c7773591b40be9aef97bb1 (diff) | |
download | searxng-59f4c792b498ef399dad5643576327da8ed122f2.tar.gz searxng-59f4c792b498ef399dad5643576327da8ed122f2.zip |
[mod] simple theme: use sharp instead of convert to create .png from .svg
define a custom grunt task, since grunt-sharp is too old (it can't be installed).
in gruntfile.js, the image tasks are moved at the end the build chain.
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'manage')
-rwxr-xr-x | manage | 30 |
1 files changed, 0 insertions, 30 deletions
@@ -708,42 +708,12 @@ themes.oscar() { themes.simple() { local static="searx/static/themes/simple" ( set -e - convert_if_newer "src/brand/searxng-wordmark.svg" "$static/img/favicon.png" \ - -transparent white -resize 64x64 build_msg GRUNT "theme: simple" npm --prefix searx/static/themes/simple run build ) dump_return $? } -convert_if_newer() { - - # usage: convert_if_newer <origfile> <outfile> [<options>, ...] - # - # convert_if_newer "path/to/origin.svg" "path/to/converted.png" -resize 100x100 - # - # Run's ImageMagik' convert comand to generate <outfile> from <origfile>, if - # <origfile> is newer than <outfile>. The command line is to convert is:: - # - # convert <origfile> [<options>, ...] <outfile> - - local src_file="$1" && shift - local dst_file="$1" && shift - - if [[ "${src_file}" -nt "${dst_file}" ]]; then - if ! required_commands convert; 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 - build_msg CONVERT "${src_file}" "$@" "${dst_file}" - convert "${src_file}" "$@" "${dst_file}" - else - build_msg CONVERT "${dst_file} (up-to-date)" - fi -} - - PYLINT_FILES=() while IFS= read -r line; do PYLINT_FILES+=("$line") |