瀏覽代碼

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 年之前
父節點
當前提交
26177084e7
共有 2 個文件被更改,包括 3 次插入3 次删除
  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
 	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

+ 2 - 2
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