瀏覽代碼

refactor: improve log directory symlink creation

The code has been refactored to improve the creation of symlinks for game log directories. The commit removes unnecessary echo statements and updates the output format to provide clearer information about the created symlinks.
Daniel Gibbs 2 年之前
父節點
當前提交
e3ac87c675
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lgsm/modules/install_logs.sh

+ 2 - 2
lgsm/modules/install_logs.sh

@@ -93,7 +93,7 @@ fi
 # e.g serverfiles/log is not within log/: symlink created
 # log/server is in log/: symlink not created
 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 [ ! -h "${logdir}/server" ] || [ "$(readlink -f "${logdir}/server")" != "${gamelogdir}" ]; 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 [ -d "${HOME}/.steam/steam/logs" ]; 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
 			fn_print_fail_eol_nl
 			core_exit.sh