diff options
author | merakor <cem@ckyln.com> | 2020-05-29 16:55:30 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-05-29 16:55:30 +0000 |
commit | e48ca12bb5a1a211717bd62659d3e588f930caa5 (patch) | |
tree | 597638f5270f7d0b84f19583d561e6b4671c52c2 | |
parent | c40cdfde32ad440cf7c989f597449806e3a89cda (diff) | |
download | cpt-e48ca12bb5a1a211717bd62659d3e588f930caa5.tar.gz |
kiss: add '$2' for version and '$3' for arch information on build
FossilOrigin-Name: 176a36aac92e9ff5f17a5580c334bb62138c281187758b8110719b82ad9ab786
-rwxr-xr-x | kiss | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 |