From 68cbb2b68d15df5bc2035d893f944bc91b2b9601 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 12 May 2020 13:02:40 +0300 Subject: [PATCH] kiss: Provide a default post-build hook --- kiss | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/kiss b/kiss index c0f37ab..28bfc36 100755 --- a/kiss +++ b/kiss @@ -76,7 +76,20 @@ pop() { } run_hook() { - [ "${KISS_HOOK:-}" ] || return 0 + # Provide a default post-build hook to remove files + # and directories for things we don't support out of + # the box. One can simply define their own hook to + # override this behavior. + [ "${KISS_HOOK:-}" ] || { + case $1 in post-build) + rm -rf "$3/usr/share/gettext" + rm -rf "$3/usr/share/polkit-1" + rm -rf "$3/usr/share/locale" + rm -rf "$3/usr/share/info" + esac + + return 0 + } log "$2" "Running $1 hook"