From 26177084e72caaa9618b75d2227297167e6378a9 Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Tue, 26 Sep 2023 23:01:48 +0100 Subject: [PATCH] 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. --- lgsm/modules/install_server_dir.sh | 2 +- linuxgsm.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lgsm/modules/install_server_dir.sh b/lgsm/modules/install_server_dir.sh index d783ebdac..33c3905df 100644 --- a/lgsm/modules/install_server_dir.sh +++ b/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 diff --git a/linuxgsm.sh b/linuxgsm.sh index 6da7de664..2fcd2d479 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 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