mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-09-30 21:40:55 -06:00
kiss: Allow hooks to modify build files
This commit is contained in:
parent
52893958d0
commit
58f5819af2
9
kiss
9
kiss
@ -583,14 +583,19 @@ pkg_build() {
|
|||||||
# Move to the build directory.
|
# Move to the build directory.
|
||||||
cd "$mak_dir/$pkg"
|
cd "$mak_dir/$pkg"
|
||||||
|
|
||||||
log "$pkg" "Starting build"
|
# Copy the build file to the current cache directory so that
|
||||||
|
# it can be modified by package manager hooks. This allows
|
||||||
|
# for simple build changes to be made without the need to
|
||||||
|
# fork the entire package.
|
||||||
|
cp -f "$repo_dir/build" .build
|
||||||
|
|
||||||
|
log "$pkg" "Starting build"
|
||||||
run_hook pre-build "$pkg" "$pkg_dir/$pkg"
|
run_hook pre-build "$pkg" "$pkg_dir/$pkg"
|
||||||
|
|
||||||
# Call the build script, log the output to the terminal
|
# Call the build script, log the output to the terminal
|
||||||
# and to a file. There's no PIPEFAIL in POSIX shelll so
|
# and to a file. There's no PIPEFAIL in POSIX shelll so
|
||||||
# we must resort to tricks like killing the script ourselves.
|
# we must resort to tricks like killing the script ourselves.
|
||||||
{ "$repo_dir/build" "$pkg_dir/$pkg" 2>&1 || {
|
{ "./.build" "$pkg_dir/$pkg" 2>&1 || {
|
||||||
log "$pkg" "Build failed"
|
log "$pkg" "Build failed"
|
||||||
log "$pkg" "Log stored to $log_dir/$pkg-$time-$pid"
|
log "$pkg" "Log stored to $log_dir/$pkg-$time-$pid"
|
||||||
run_hook build-fail "$pkg" "$pkg_dir/$pkg"
|
run_hook build-fail "$pkg" "$pkg_dir/$pkg"
|
||||||
|
Loading…
Reference in New Issue
Block a user