diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-02-07 13:24:13 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-02-07 13:24:13 +0000 |
commit | c9172ab50b0209e50addefd6748d4dd79efba6da (patch) | |
tree | 46a6780290c36df3554063cc2652683a65d7f6de /kiss | |
parent | 92f52af1d0336141c18c7256fb019b8c16a761d9 (diff) | |
download | cpt-c9172ab50b0209e50addefd6748d4dd79efba6da.tar.gz |
kiss: Added pre/post build hooks. Closes #108
FossilOrigin-Name: b36d58f121dbb7e765e4cedcd24797a021235ae88b1897389ce1b0c70e9b98c6
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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" |