summarylogtreecommitdiffstats
path: root/optipng-exec.sh.in
blob: eb7211161feba6cfa3d15a50b5d1021c7121f7f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
}