From c091a1d0893a3837fbc65ffcf46700c52bbe7570 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 27 Sep 2023 10:51:42 +0100 Subject: [PATCH] feat: improve fetch file output - Updated the fetch file function in core_dl.sh and linuxgsm.sh to provide more informative output. - Replaced the parentheses with square brackets to enclose the local filename. - Added italics formatting to highlight the local filename. --- lgsm/modules/core_dl.sh | 2 +- linuxgsm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 2a6c7c400a..66c76eb21a 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -403,7 +403,7 @@ fn_fetch_file() { "${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1 exitcode="$?" else - echo -en "fetching ${fileurl_name} ${local_filename}...\c" + echo -en "fetching ${fileurl_name} [ ${italic}${local_filename}${default} ]\c" "${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1 exitcode="$?" fi diff --git a/linuxgsm.sh b/linuxgsm.sh index 26e07fa6a4..458cc0bd1c 100755 --- a/linuxgsm.sh +++ b/linuxgsm.sh @@ -106,7 +106,7 @@ fn_bootstrap_fetch_file() { trap fn_fetch_trap INT # Larger files show a progress bar. - echo -en "fetching ${fileurl_name} ( ${local_filename} )\c" + echo -en "fetching ${fileurl_name} [ ${local_filename} ]\c" curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1) local exitcode=$?