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.
Daniel Gibbs 2 years ago
parent
commit
26177084e7
2 changed files with 3 additions and 3 deletions
  1. 1 1
      lgsm/modules/install_server_dir.sh
  2. 2 2
      linuxgsm.sh

+ 1 - 1
lgsm/modules/install_server_dir.sh

@@ -15,7 +15,7 @@ echo -en "creating ( ${serverfiles} )"
 
 
 if [ -d "${serverfiles}" ]; then
 if [ -d "${serverfiles}" ]; then
 	fn_print_skip_eol_nl
 	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
 else
 	fn_print_ok_eol_nl
 	fn_print_ok_eol_nl
 fi
 fi

+ 2 - 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 from ${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=$?
@@ -136,7 +136,7 @@ fn_bootstrap_fetch_file() {
 					fi
 					fi
 				fi
 				fi
 			else
 			else
-				echo -en "OK"
+				echo -en " [ OK ]"
 				sleep 0.3
 				sleep 0.3
 				echo -en "\033[2K\\r"
 				echo -en "\033[2K\\r"
 				if [ -f "${lgsmlog}" ]; then
 				if [ -f "${lgsmlog}" ]; then