Browse Source

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.
feature/dst-changes
Daniel Gibbs 2 years ago
parent
commit
c091a1d089
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 2
      lgsm/modules/core_dl.sh
  2. 2
      linuxgsm.sh

2
lgsm/modules/core_dl.sh

@ -403,7 +403,7 @@ fn_fetch_file() {
"${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1 "${curlcmd[@]}" --progress-bar "${fileurl}" 2>&1
exitcode="$?" exitcode="$?"
else 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 "${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1
exitcode="$?" exitcode="$?"
fi fi

2
linuxgsm.sh

@ -106,7 +106,7 @@ fn_bootstrap_fetch_file() {
trap fn_fetch_trap INT trap fn_fetch_trap INT
# Larger files show a progress bar. # 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) curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1)
local exitcode=$? local exitcode=$?

Loading…
Cancel
Save