Explorar el Código

refactor: improve log directory creation messages

- Changed the log directory creation messages to include square brackets around the directory paths.
- Updated the console log and game log directory creation messages to use square brackets as well.
- Modified the symlink creation messages for game logs and Steam logs to also include square brackets.

This commit improves the readability of the log directory creation process by adding square brackets around the relevant paths.
Daniel Gibbs hace 2 años
padre
commit
9f390f0fa2
Se han modificado 2 ficheros con 10 adiciones y 10 borrados
  1. 2 2
      lgsm/modules/core_messages.sh
  2. 8 8
      lgsm/modules/install_logs.sh

+ 2 - 2
lgsm/modules/core_messages.sh

@@ -526,12 +526,12 @@ fn_print_update_eol_nl() {
 
 
 # SKIP
 # SKIP
 fn_print_skip_eol() {
 fn_print_skip_eol() {
-	echo -en " ${cyan}SKIP${default}"
+	echo -en " ... ${cyan}SKIP${default}"
 	fn_sleep_time
 	fn_sleep_time
 }
 }
 
 
 fn_print_skip_eol_nl() {
 fn_print_skip_eol_nl() {
-	echo -e " ${cyan}SKIP${default}"
+	echo -e " ... ${cyan}SKIP${default}"
 	fn_sleep_time
 	fn_sleep_time
 }
 }
 
 

+ 8 - 8
lgsm/modules/install_logs.sh

@@ -14,7 +14,7 @@ if [ -z "${checklogs}" ]; then
 	fn_sleep_time
 	fn_sleep_time
 fi
 fi
 
 
-echo -en "creating log directory ([${logdir} )"
+echo -en "creating log directory [ ${logdir} ]"
 if [ ! -d "${logdir}" ]; then
 if [ ! -d "${logdir}" ]; then
 	if ! mkdir -p "${logdir}"; then
 	if ! mkdir -p "${logdir}"; then
 		fn_print_fail_eol_nl
 		fn_print_fail_eol_nl
@@ -26,7 +26,7 @@ else
 	fn_print_skip_eol_nl
 	fn_print_skip_eol_nl
 fi
 fi
 
 
-echo -en "creating script log directory ( ${lgsmlogdir} )"
+echo -en "creating script log directory [ ${lgsmlogdir} ]"
 if [ ! -d "${lgsmlogdir}" ]; then
 if [ ! -d "${lgsmlogdir}" ]; then
 	if ! mkdir -p "${lgsmlogdir}"; then
 	if ! mkdir -p "${lgsmlogdir}"; then
 		fn_print_fail_eol_nl
 		fn_print_fail_eol_nl
@@ -38,7 +38,7 @@ else
 	fn_print_skip_eol_nl
 	fn_print_skip_eol_nl
 fi
 fi
 
 
-echo -en "creating script log ( ${lgsmlog} )"
+echo -en "creating script log [ ${lgsmlog} ]"
 if [ ! -f "${lgsmlog}" ]; then
 if [ ! -f "${lgsmlog}" ]; then
 	if ! touch "${lgsmlog}"; then
 	if ! touch "${lgsmlog}"; then
 		fn_print_fail_eol_nl
 		fn_print_fail_eol_nl
@@ -50,7 +50,7 @@ else
 	fn_print_skip_eol_nl
 	fn_print_skip_eol_nl
 fi
 fi
 
 
-echo -en "creating console log directory ( ${consolelogdir} )"
+echo -en "creating console log directory [ ${consolelogdir} ]"
 if [ ! -d "${consolelogdir}" ]; then
 if [ ! -d "${consolelogdir}" ]; then
 	if ! mkdir -p "${consolelogdir}"; then
 	if ! mkdir -p "${consolelogdir}"; then
 		fn_print_fail_eol_nl
 		fn_print_fail_eol_nl
@@ -62,7 +62,7 @@ else
 	fn_print_skip_eol_nl
 	fn_print_skip_eol_nl
 fi
 fi
 
 
-echo -en "creating console log ( ${consolelog} )"
+echo -en "creating console log [ ${consolelog} ]"
 if [ ! -f "${consolelog}" ]; then
 if [ ! -f "${consolelog}" ]; then
 	if ! touch "${consolelog}"; then
 	if ! touch "${consolelog}"; then
 		fn_print_fail_eol_nl
 		fn_print_fail_eol_nl
@@ -75,7 +75,7 @@ else
 fi
 fi
 
 
 if [ -n "${gamelogdir}" ]; then
 if [ -n "${gamelogdir}" ]; then
-	echo -en "creating game log directory ( ${gamelogdir} )"
+	echo -en "creating game log directory [ ${gamelogdir} ]"
 	if [ ! -d "${gamelogdir}" ]; then
 	if [ ! -d "${gamelogdir}" ]; then
 		if ! mkdir -p "${gamelogdir}"; then
 		if ! mkdir -p "${gamelogdir}"; then
 			fn_print_fail_eol_nl
 			fn_print_fail_eol_nl
@@ -93,7 +93,7 @@ fi
 # e.g serverfiles/log is not within log/: symlink created
 # e.g serverfiles/log is not within log/: symlink created
 # log/server is in log/: symlink not created
 # log/server is in log/: symlink not created
 if [ -n "${gamelogdir}" ] && [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ]; then
 if [ -n "${gamelogdir}" ] && [ "${gamelogdir:0:${#logdir}}" != "${logdir}" ]; then
-	echo -en "creating symlink to game log dir ( ${logdir}/server -> ${gamelogdir} )"
+	echo -en "creating symlink to game log dir [ ${logdir}/server -> ${gamelogdir} )"
 	# if path does not exist or does not match gamelogdir
 	# if path does not exist or does not match gamelogdir
 	if [ ! -h "${logdir}/server" ] || [ "$(readlink -f "${logdir}/server")" != "${gamelogdir}" ]; then
 	if [ ! -h "${logdir}/server" ] || [ "$(readlink -f "${logdir}/server")" != "${gamelogdir}" ]; then
 		if ! ln -nfs "${gamelogdir}" "${logdir}/server"; then
 		if ! ln -nfs "${gamelogdir}" "${logdir}/server"; then
@@ -110,7 +110,7 @@ fi
 # If server uses SteamCMD create a symbolic link to the Steam logs.
 # If server uses SteamCMD create a symbolic link to the Steam logs.
 if [ -d "${HOME}/.steam/steam/logs" ]; then
 if [ -d "${HOME}/.steam/steam/logs" ]; then
 	if [ ! -L "${logdir}/steam" ]; then
 	if [ ! -L "${logdir}/steam" ]; then
-		echo -en "creating symlink to steam log dir ( ${logdir}/steam -> ${HOME}/.steam/steam/logs )"
+		echo -en "creating symlink to steam log dir [ ${logdir}/steam -> ${HOME}/.steam/steam/logs )"
 		if ! ln -nfs "${HOME}/.steam/steam/logs" "${logdir}/steam"; then
 		if ! ln -nfs "${HOME}/.steam/steam/logs" "${logdir}/steam"; then
 			fn_print_fail_eol_nl
 			fn_print_fail_eol_nl
 			core_exit.sh
 			core_exit.sh