diff options
Diffstat (limited to 'optipng-exec.sh.in')
-rw-r--r-- | optipng-exec.sh.in | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/optipng-exec.sh.in b/optipng-exec.sh.in new file mode 100644 index 000000000000..eb7211161feb --- /dev/null +++ b/optipng-exec.sh.in @@ -0,0 +1,22 @@ +#!/usr/bin/bash +# +# optipng.sh - Optimize PNG image files +# + +[[ -n "$LIBMAKEPKG_EXECUTABLE_OPTIPNG_SH" ]] && return +LIBMAKEPKG_EXECUTABLE_OPTIPNG_SH=1 + +LIBRARY=${LIBRARY:-'@libmakepkgdir@'} + +source "$LIBRARY/util/option.sh" + +executable_functions+=('executable_optipng') + +executable_optipng() { + if check_option "optipng" "y"; then + if ! type -p optipng >/dev/null; then + error "$(gettext "Cannot find the %s binary required for optimizing PNG image files.")" "optipng" + ret=1 + fi + fi +} |