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