cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 01052e7d649feb73e9b1ac93fcfeacd8bcb922f6
parent 9d86bb5f9d19f9233d4d730c0f3dd912afea5736
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Fri,  7 Feb 2020 15:24:14 +0200

kiss: Added pre/post build hooks. Closes #108

Diffstat:
Mkiss | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/kiss b/kiss @@ -598,6 +598,11 @@ pkg_build() { log "$pkg" "Starting build" + if [ -x "$KISS_HOOK" ]; then + log "$pkg" "Running pre-build hook" + "$KISS_HOOK" pre "$pkg" "$pkg_dir/$pkg" + fi + # Call the build script, log the output to the terminal # and to a file. There's no PIPEFAIL in POSIX shelll so # we must resort to tricks like killing the script ourselves. @@ -618,6 +623,11 @@ pkg_build() { log "$pkg" "Successfully built package" + if [ -x "$KISS_HOOK" ]; then + log "$pkg" "Running post-build hook" + "$KISS_HOOK" post "$pkg" "$pkg_dir/$pkg" + fi + # Create the manifest file early and make it empty. # This ensure that the manifest is added to the manifest... : > "$pkg_dir/$pkg/$pkg_db/$pkg/manifest"