From: Michael Tremer Date: Tue, 16 Jun 2026 11:17:53 +0000 (+0000) Subject: make.sh: Enable the timer conditionally X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=244619e985f3524e46e71c8223080092d4cdb511;p=ipfire-2.x.git make.sh: Enable the timer conditionally Signed-off-by: Michael Tremer --- diff --git a/make.sh b/make.sh index 4b70e15ad..cfcbb7635 100755 --- a/make.sh +++ b/make.sh @@ -527,6 +527,7 @@ execute() { local command=() local interactive="false" local network="false" + local timer="false" # Collect environment variables local -A environ=( @@ -685,6 +686,10 @@ execute() { ) ;; + --timer) + timer="true" + ;; + -*) echo "Unknown argument: ${1}" >&2 return 2 @@ -823,7 +828,9 @@ execute() { done # Print the total runtime - print_runtime "$(( SECONDS - t ))" + if [ "${timer}" = "true" ]; then + print_runtime "$(( SECONDS - t ))" + fi esac return "${r}" @@ -875,7 +882,7 @@ lfsmake1() { exiterror "Downloading ${pkg}" fi - if ! make_pkg "${pkg}" TOOLCHAIN=1 ROOT="${BUILD_DIR}" b2 install "$@"; then + if ! make_pkg --timer "${pkg}" TOOLCHAIN=1 ROOT="${BUILD_DIR}" b2 install "$@"; then print_status FAIL exiterror "Building ${pkg}" @@ -917,7 +924,7 @@ lfsmake2() { fi # Run install on the package - if ! make_pkg --chroot "${args[@]}" "${pkg}" b2 install "$@"; then + if ! make_pkg --chroot --timer "${args[@]}" "${pkg}" b2 install "$@"; then print_status FAIL exiterror "Building ${pkg}" @@ -935,7 +942,7 @@ ipfiredist() { [ $? == 1 ] && return 0 # Run dist on the package - if ! make_pkg --chroot "${pkg}" dist "$@"; then + if ! make_pkg --chroot --timer "${pkg}" dist "$@"; then print_status FAIL exiterror "Packaging ${pkg}"