1
0
mirror of https://codeberg.org/kiss-community/kiss synced 2024-12-25 08:30:05 -07:00

kiss: fix environment change, old code was..

This commit is contained in:
Dylan Araps 2021-07-14 13:11:26 +03:00
parent 61b5972ebb
commit a1377fd282
No known key found for this signature in database
GPG Key ID: 13295DAC2CF13B5C

8
kiss
View File

@ -805,16 +805,16 @@ pkg_build() {
# Call the build script, log the output to the terminal and to a file.
# There's no PIPEFAIL in POSIX shell so we must resort to tricks like kill.
{
set -a
# Give the script a modified environment. Define CC and CXX giving them
# the generic values cc and c++. Define KISS_ROOT sanitized to ensure
# safe path joining in build files.
#
# shellcheck disable=2034
CC="${CC:-cc}" \
CXX="${CXX:-c++}" \
DESTDIR="$pkg_dir/$1" \
KISS_ROOT="$KISS_ROOT" \
\
"$repo_dir/build" "$pkg_dir/$1" "$repo_ver" 2>&1 || {
log "$1" "Build failed"
log "$1" "Log stored to $log_dir/$1-$time-$pid"
@ -822,8 +822,6 @@ pkg_build() {
pkg_clean
kill 0
}
set +a
} | tee "$log_dir/$1-$time-$pid"
# Delete the log file if the build succeeded to prevent the directory