kiss: Provide a default post-build hook

This commit is contained in:
Dylan Araps 2020-05-12 13:02:40 +03:00
parent f095e9fb98
commit 68cbb2b68d
No known key found for this signature in database
GPG Key ID: 46D62DD9F1DE636E
1 changed files with 14 additions and 1 deletions

15
kiss
View File

@ -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"