From e48ca12bb5a1a211717bd62659d3e588f930caa5 Mon Sep 17 00:00:00 2001 From: merakor Date: Fri, 29 May 2020 16:55:30 +0000 Subject: kiss: add '$2' for version and '$3' for arch information on build FossilOrigin-Name: 176a36aac92e9ff5f17a5580c334bb62138c281187758b8110719b82ad9ab786 --- kiss | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/kiss b/kiss index d76b9d0..cd26410 100755 --- a/kiss +++ b/kiss @@ -681,6 +681,8 @@ pkg_build() { pkg_extract "$pkg" repo_dir=$(pkg_find "$pkg") + read -r build_version _ < "$repo_dir/version" + # Install built packages to a directory under the package name # to avoid collisions with other packages. mkdir -p "$pkg_dir/$pkg/$pkg_db" @@ -695,7 +697,7 @@ pkg_build() { # 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. - { "$repo_dir/build" "$pkg_dir/$pkg" 2>&1 || { + { "$repo_dir/build" "$pkg_dir/$pkg" "$build_version" "$sys_arch" 2>&1 || { log "$pkg" "Build failed" log "$pkg" "Log stored to $log_dir/$pkg-$time-$pid" run_hook build-fail "$pkg" "$pkg_dir/$pkg" @@ -1650,6 +1652,10 @@ main() { KISS_ROOT=${KISS_ROOT%/} } + # Define an optional sys_arch variable in order to provide + # information to build files with architectural information. + sys_arch=$(uname -m 2>/dev/null) ||: + # Define this variable but don't create its directory structure from # the get go. It will be created as needed by package installation. sys_db=$KISS_ROOT/$pkg_db -- cgit v1.2.3