Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
kiss: remove logs again!
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Sep 2, 2019
1 parent dc7edb7 commit b8da07d
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions kiss
Original file line number Diff line number Diff line change
Expand Up @@ -502,18 +502,8 @@ pkg_build() {
# Move to the build directory.
cd "$mak_dir/$pkg"

# Call the build script and create a temporary file on error.
# This is the simplest way to mimic "pipefail" in POSIX sh as
# you cannot exit from within a pipe.
{ "$repo_dir/build" "$pkg_dir/$pkg" || :> err; } 2>&1 | tee log

# If the file exists the build errored, die here and save the log.
[ -f err ] && {
cp -f log "$log_dir/$pkg-$date.log"

die "[$pkg] Build failed" \
"[$pkg] Build log saved to '$log_dir/$pkg-$date.log'"
}
# Call the build script.
"$repo_dir/build" "$pkg_dir/$pkg" || die "[$pkg] Build failed"

# Copy the repository files to the package directory.
# This acts as the database entry.
Expand Down Expand Up @@ -1095,9 +1085,6 @@ main() {
# variable is ever changed.
old_ifs=$IFS

# Store the current date and time for build error logs.
date=$(date +%Y-%m-%d-%H:%M)

# Catch errors and ensure that build files and directories are cleaned
# up before we die. This occurs on 'Ctrl+C' as well as success and error.
trap pkg_clean EXIT INT
Expand All @@ -1110,7 +1097,6 @@ main() {
"${tar_dir:=$cac_dir/extract-$pid}" \
"${src_dir:=$cac_dir/sources}" \
"${bin_dir:=$cac_dir/bin}" \
"${log_dir:=$cac_dir/logs}" \
|| die "Couldn't create cache directories"

args "$@"
Expand Down

0 comments on commit b8da07d

Please sign in to comment.