diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-02-07 13:29:28 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-02-07 13:29:28 +0000 |
commit | 5ebede82887961943ebb3c2da4dcdc97ab6aafc6 (patch) | |
tree | e449b56c7e30fafefb55f86a0c287321766c3c88 | |
parent | c9172ab50b0209e50addefd6748d4dd79efba6da (diff) | |
download | cpt-5ebede82887961943ebb3c2da4dcdc97ab6aafc6.tar.gz |
kiss: Added pre/post build hooks. Closes #108
FossilOrigin-Name: a4b41b84d76f51966062425b4d9e87ee0cb0bc005c52e04d2045d6a51b63ff84
-rwxr-xr-x | kiss | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,4 +1,5 @@ #!/bin/sh -ef +# shellcheck source=/dev/null # # This is a simple package manager written in POSIX 'sh' for use # in KISS Linux (https://getkiss.org). @@ -598,9 +599,9 @@ pkg_build() { log "$pkg" "Starting build" - if [ -x "$KISS_HOOK" ]; then + if [ "$KISS_HOOK" ]; then log "$pkg" "Running pre-build hook" - "$KISS_HOOK" pre "$pkg" "$pkg_dir/$pkg" + TYPE=pre PKG=$pkg DEST=$pkg_dir/$pkg . "$KISS_HOOK" fi # Call the build script, log the output to the terminal @@ -623,9 +624,9 @@ pkg_build() { log "$pkg" "Successfully built package" - if [ -x "$KISS_HOOK" ]; then + if [ "$KISS_HOOK" ]; then log "$pkg" "Running post-build hook" - "$KISS_HOOK" post "$pkg" "$pkg_dir/$pkg" + TYPE=post PKG=$pkg DEST=$pkg_dir/$pkg . "$KISS_HOOK" fi # Create the manifest file early and make it empty. |