Sfoglia il codice sorgente

refactor: improve console output for checking and fetching files

- Updated the console output in `command_update_linuxgsm.sh` to include formatting and improved readability.
- Improved the console output in `core_dl.sh` to include formatting and better indicate the progress of file fetching.
Daniel Gibbs 2 anni fa
parent
commit
83d6fda4c6
2 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 1 1
      lgsm/modules/command_update_linuxgsm.sh
  2. 1 1
      lgsm/modules/core_dl.sh

+ 1 - 1
lgsm/modules/command_update_linuxgsm.sh

@@ -68,7 +68,7 @@ fi
 # Check gameserver.sh
 # Check gameserver.sh
 # Compare gameserver.sh against linuxgsm.sh in the tmp dir.
 # Compare gameserver.sh against linuxgsm.sh in the tmp dir.
 # Ignoring server specific vars.
 # Ignoring server specific vars.
-echo -en "checking ${selfname}...\c"
+echo -en "${dim}checking ${selfname} ...\c${default}"
 fn_script_log_info "Checking ${selfname}"
 fn_script_log_info "Checking ${selfname}"
 script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}"))
 script_diff=$(diff <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${tmpdir}/linuxgsm.sh") <(sed '\/shortname/d;\/gameservername/d;\/gamename/d;\/githubuser/d;\/githubrepo/d;\/githubbranch/d' "${rootdir}/${selfname}"))
 if [ "${script_diff}" != "" ]; then
 if [ "${script_diff}" != "" ]; then

+ 1 - 1
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 "${dim}fetching from ${fileurl_name} ( ${local_filename} )\c${default}"
+				echo -en "${dim}fetching from ${fileurl_name} ( ${local_filename} ) ... \c${default}"
 				"${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1
 				"${curlcmd[@]}" --silent --show-error "${fileurl}" 2>&1
 				exitcode="$?"
 				exitcode="$?"
 			fi
 			fi