Просмотр исходного кода

Reverting commit, no requirement to bypass this.

Rather than get no output mkdir message states that the directory already exists. This looks better than having nothing at all.
Daniel Gibbs 9 лет назад
Родитель
Сommit
4155af5d60
1 измененных файлов с 7 добавлено и 19 удалено
  1. 7 19
      lgsm/functions/install_logs.sh

+ 7 - 19
lgsm/functions/install_logs.sh

@@ -15,22 +15,12 @@ if [ "${checklogs}" != "1" ]; then
 fi
 fi
 sleep 1
 sleep 1
 # Create dir's for the script and console logs
 # Create dir's for the script and console logs
-if [ ! -d "${rootdir}/log" ]; then
-	mkdir -v "${rootdir}/log"
-fi
-if [ ! -d "${scriptlogdir}" ]; then
-	mkdir -v "${scriptlogdir}"
-fi
-if [ ! -f "${scriptlog}" ]; then
-	touch "${scriptlog}"
-fi
+mkdir -v "${rootdir}/log"
+mkdir -v "${scriptlogdir}"
+touch "${scriptlog}"
 if [ -n "${consolelogdir}" ]; then
 if [ -n "${consolelogdir}" ]; then
-	if [ ! -d "${consolelogdir}" ]; then
-		mkdir -v "${consolelogdir}"
-	fi
-	if [ ! -f "${consolelog}" ]; then
-		touch "${consolelog}"
-	fi
+	mkdir -v "${consolelogdir}"
+	touch "${consolelog}"
 fi
 fi
 
 
 # If a server is source or goldsource, TeamSpeak 3, Starbound, Project Zomhoid create a symbolic link to the game server logs.
 # If a server is source or goldsource, TeamSpeak 3, Starbound, Project Zomhoid create a symbolic link to the game server logs.
@@ -42,9 +32,7 @@ fi
 
 
 # If a server is unreal2 or unity3d create a dir.
 # If a server is unreal2 or unity3d create a dir.
 if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Teeworlds" ]||[ "${gamename}" == "seriousengine35" ]; then
 if [ "${engine}" == "unreal2" ]||[ "${engine}" == "unity3d" ]||[ "${gamename}" == "Teeworlds" ]||[ "${gamename}" == "seriousengine35" ]; then
-	if [ ! -d "${gamelogdir}" ]; then
-		mkdir -pv "${gamelogdir}"
-	fi
+	mkdir -pv "${gamelogdir}"
 fi
 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.
@@ -54,4 +42,4 @@ if [ -d "${rootdir}/Steam/logs" ]; then
 	fi
 	fi
 fi
 fi
 sleep 1
 sleep 1
-fn_script_log_info "Logs installed"
+fn_script_log_info "Logs installed"