From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 7316B138335 for ; Tue, 23 Jul 2019 19:47:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7BC65E086F; Tue, 23 Jul 2019 19:47:19 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 63044E086F for ; Tue, 23 Jul 2019 19:47:19 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F0069348543 for ; Tue, 23 Jul 2019 19:47:17 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 883F172B for ; Tue, 23 Jul 2019 19:47:16 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1563909083.10e69db8ae7dc7ccfb1b4f5bad1e6f179c7d9bf1.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_determineargs.sh gen_funcs.sh X-VCS-Directories: / X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 10e69db8ae7dc7ccfb1b4f5bad1e6f179c7d9bf1 X-VCS-Branch: master Date: Tue, 23 Jul 2019 19:47:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 69846832-6f0d-4384-a5fd-3b4e322222aa X-Archives-Hash: 3b120f19fcf95cd2fcf70d2b344de0f5 commit: 10e69db8ae7dc7ccfb1b4f5bad1e6f179c7d9bf1 Author: Thomas Deutschmann gentoo org> AuthorDate: Tue Jul 23 19:11:23 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Jul 23 19:11:23 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=10e69db8 Log genkernel start and end time Signed-off-by: Thomas Deutschmann gentoo.org> gen_determineargs.sh | 9 ++------- gen_funcs.sh | 5 +++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 549fb59..eb0cd74 100755 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -204,13 +204,8 @@ determine_real_args() { small_die "Cannot write to '${LOGFILE}'!" fi - if [ -f "${LOGFILE}" ] - then - # Truncate existing logfile - echo > "${LOGFILE}" 2>/dev/null || small_die "Could not write to '${LOGFILE}'!" - else - touch "${LOGFILE}" || small_die "Failed to create '${LOGFILE}'!" - fi + GK_TIME_START=$(date +%s) + echo ">>> Started genkernel v${GK_V} on: $(date +"%Y-%m-%d %H:%M:%S")" > "${LOGFILE}" 2>/dev/null || small_die "Could not write to '${LOGFILE}'!" dump_debugcache diff --git a/gen_funcs.sh b/gen_funcs.sh index 33b05b7..3c91372 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -370,6 +370,11 @@ cleanup() { print_info 3 "CACHE_DIR: ${CACHE_DIR}" print_info 3 "TMPDIR: ${TMPDIR}" fi + + GK_TIME_END=$(date +%s) + let GK_TIME_RUNTIME_SECONDS=${GK_TIME_END}-${GK_TIME_START} + let GK_TIME_RUNTIME_DAYS=${GK_TIME_RUNTIME_SECONDS}/86400 + TZ= printf ">>> Ended on: $(date +"%Y-%m-%d %H:%M:%S") (after %d days%(%k hours %M minutes %S seconds)T)\n" ${GK_TIME_RUNTIME_DAYS} ${GK_TIME_RUNTIME_SECONDS} >> "${LOGFILE}" 2>/dev/null } clear_tmpdir() {