From cb0900e2f50ad6f7983babc438a89264778f3146 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Tue, 6 May 2025 04:31:38 +0200 Subject: [PATCH] Fix. --- bookworm/scripts/lib/apt_get_digested | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bookworm/scripts/lib/apt_get_digested b/bookworm/scripts/lib/apt_get_digested index 2a88b53..8171822 100644 --- a/bookworm/scripts/lib/apt_get_digested +++ b/bookworm/scripts/lib/apt_get_digested @@ -6,6 +6,7 @@ prefixed_msg_init 'apt_get_digested' abort_if_command_unknown calc +_FINISH_LINE='apt_get_digested FINISH_LINE' _SEDS=\ '|\(Reading database \.\.\. .*|IGNORE |Generation complete.|IGNORE @@ -32,10 +33,14 @@ update-alternatives: providing in auto mode:|update-alternatives: using ([[:prin _LAST_PREFIX='' _STARTED_PRINTING= -DEBIAN_FRONTEND=noninteractive apt-get -y $1 2>&1 | while read _LINE; do +DEBIAN_FRONTEND=noninteractive apt-get -y; echo "${_FINISH_LINE}" $1 2>&1 | while read _LINE; do _LINE=$(printf '%s' "${_LINE}" | tr -d '\r') if [ -z "${_LINE}" ]; then continue + elif [ "${_LINE}" = "${_FINISH_LINE}" ]; then + test ! -z "${_STARTED_PRINTING}" && printf '\n' + printf '\r' + break fi _COMPRESSED_ITEM='' for _SED in $(printf '%s' "${_SEDS}" | sed 's/ /#WHITESPACE#/g'); do @@ -71,8 +76,6 @@ DEBIAN_FRONTEND=noninteractive apt-get -y $1 2>&1 | while read _LINE; do fi _STARTED_PRINTING=1 done -test ! -z "${_STARTED_PRINTING}" && printf '\n' -printf '\r' prefixed_msg_exit } -- 2.30.2