Browse Source

refactor: improve console output for fetching files

The commit refactors the code in `install_server_dir.sh` and `linuxgsm.sh` to improve the console output when fetching files. The message now includes more descriptive information about the file being fetched, such as the source URL and local filename. Additionally, the success message has been updated to include brackets around "OK" for better readability.
feature/dst-changes
Daniel Gibbs 2 years ago
parent
commit
26177084e7
No known key found for this signature in database GPG Key ID: 2076B128385E8C55
  1. 2
      lgsm/modules/install_server_dir.sh
  2. 4
      linuxgsm.sh

2
lgsm/modules/install_server_dir.sh

@ -15,7 +15,7 @@ echo -en "creating ( ${serverfiles} )"
if [ -d "${serverfiles}" ]; then
fn_print_skip_eol_nl
echo -e "\n* A game server is already exists at this location.\n"
echo -e "\n* A game server is already exists at this location."
else
fn_print_ok_eol_nl
fi

4
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 from ${fileurl_name} ( ${local_filename} )\c"
curlcmd=$(curl --connect-timeout 10 -s --fail -L -o "${local_filedir}/${local_filename}" "${fileurl}" 2>&1)
local exitcode=$?
@ -136,7 +136,7 @@ fn_bootstrap_fetch_file() {
fi
fi
else
echo -en "OK"
echo -en " [ OK ]"
sleep 0.3
echo -en "\033[2K\\r"
if [ -f "${lgsmlog}" ]; then

Loading…
Cancel
Save