forked from kiss-community/kiss
kiss: Added pre/post build hooks. Closes #108
This commit is contained in:
parent
01052e7d64
commit
9afe0baafd
9
kiss
9
kiss
@ -1,4 +1,5 @@
|
|||||||
#!/bin/sh -ef
|
#!/bin/sh -ef
|
||||||
|
# shellcheck source=/dev/null
|
||||||
#
|
#
|
||||||
# This is a simple package manager written in POSIX 'sh' for use
|
# This is a simple package manager written in POSIX 'sh' for use
|
||||||
# in KISS Linux (https://getkiss.org).
|
# in KISS Linux (https://getkiss.org).
|
||||||
@ -598,9 +599,9 @@ pkg_build() {
|
|||||||
|
|
||||||
log "$pkg" "Starting build"
|
log "$pkg" "Starting build"
|
||||||
|
|
||||||
if [ -x "$KISS_HOOK" ]; then
|
if [ "$KISS_HOOK" ]; then
|
||||||
log "$pkg" "Running pre-build hook"
|
log "$pkg" "Running pre-build hook"
|
||||||
"$KISS_HOOK" pre "$pkg" "$pkg_dir/$pkg"
|
TYPE=pre PKG=$pkg DEST=$pkg_dir/$pkg . "$KISS_HOOK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Call the build script, log the output to the terminal
|
# Call the build script, log the output to the terminal
|
||||||
@ -623,9 +624,9 @@ pkg_build() {
|
|||||||
|
|
||||||
log "$pkg" "Successfully built package"
|
log "$pkg" "Successfully built package"
|
||||||
|
|
||||||
if [ -x "$KISS_HOOK" ]; then
|
if [ "$KISS_HOOK" ]; then
|
||||||
log "$pkg" "Running post-build hook"
|
log "$pkg" "Running post-build hook"
|
||||||
"$KISS_HOOK" post "$pkg" "$pkg_dir/$pkg"
|
TYPE=post PKG=$pkg DEST=$pkg_dir/$pkg . "$KISS_HOOK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create the manifest file early and make it empty.
|
# Create the manifest file early and make it empty.
|
||||||
|
Loading…
Reference in New Issue
Block a user