@@ -102,7 +102,7 @@ fn_install_mono_repo(){
102102}
103103
104104fn_install_universe_repo (){
105- # Defensive coding - As this is an ubuntu only issue then check to make sure this fix is needed, and we are using ubuntu
105+ # Defensive coding - As this is an ubuntu only issue then check to make sure this fix is needed, and we are using ubuntu.
106106 if [ " ${jquniversemissing} " != " 0" ]&& [ " ${distroid} " == " ubuntu" ]; then
107107 fn_print_warning_nl " Ubuntu 18.04.1 contains a bug which means the sources.list file does not populate with the Ubuntu universe repository."
108108 fn_print_information_nl " Attempting to add Universe Repo"
@@ -138,7 +138,7 @@ fn_install_universe_repo(){
138138}
139139
140140fn_deps_detector (){
141- # Checks if dependency is missing
141+ # Checks if dependency is missing.
142142 if [ " ${tmuxcheck} " == " 1" ]; then
143143 # Added for users compiling tmux from source to bypass check.
144144 depstatus=0
@@ -152,16 +152,16 @@ fn_deps_detector(){
152152 elif [ " ${deptocheck} " == " jq" ]&& [ " ${distroversion} " == " 6" ]; then
153153 jqstatus=1
154154 elif [ " ${deptocheck} " == " jq" ]&& [ " ${distroid} " == " ubuntu" ]&& [ " ${distroversion} " == " 18.04" ]&& ! grep -qE " ^deb .*universe" /etc/apt/sources.list; then
155- # 1985 ubuntu 18.04.1 bug does not set sources.list correctly which means universe is not active by default
156- # If the universe repo does not exist, mark as dependency missing and universe missing
155+ # # 1985 ubuntu 18.04.1 bug does not set sources.list correctly which means universe is not active by default
156+ # If the universe repo does not exist, mark as dependency missing and universe missing.
157157 depstatus=1
158158 jquniversemissing=1
159159 elif [ " ${deptocheck} " == " mono-complete" ]; then
160160 if [ " $( command -v mono 2> /dev/null) " ]&& [ " $( mono --version 2>&1 | grep -Po ' (?<=version )\d' ) " -ge 5 ]; then
161- # Mono >= 5.0.0 already installed
161+ # Mono >= 5.0.0 already installed.
162162 depstatus=0
163163 else
164- # Mono not installed or installed Mono < 5.0.0
164+ # Mono not installed or installed Mono < 5.0.0.
165165 depstatus=1
166166 monostatus=1
167167 fi
@@ -174,35 +174,35 @@ fn_deps_detector(){
174174 fi
175175
176176 if [ " ${depstatus} " == " 0" ]; then
177- # if dependency is found
177+ # If dependency is found.
178178 missingdep=0
179179 if [ " ${function_selfname} " == " command_install.sh" ]; then
180180 echo -e " ${green}${deptocheck}${default} "
181181 fn_sleep_time
182182 fi
183183 else
184- # if dependency is not found
184+ # If dependency is not found.
185185 missingdep=1
186186 if [ " ${function_selfname} " == " command_install.sh" ]; then
187187 echo -e " ${red}${deptocheck}${default} "
188188 fn_sleep_time
189189 fi
190- # Define required dependencies for SteamCMD
190+ # Define required dependencies for SteamCMD.
191191 if [ -n " ${appid} " ]; then
192192 if [ " ${deptocheck} " == " glibc.i686" ]|| [ " ${deptocheck} " == " libstdc++64.i686" ]|| [ " ${deptocheck} " == " lib32gcc1" ]|| [ " ${deptocheck} " == " libstdc++6:i386" ]; then
193193 steamcmdfail=1
194194 fi
195195 fi
196196 fi
197197
198- # Missing dependencies are added to array_deps_missing
198+ # Missing dependencies are added to array_deps_missing.
199199 if [ " ${missingdep} " == " 1" ]; then
200200 array_deps_missing+=(" ${deptocheck} " )
201201 fi
202202}
203203
204204fn_deps_email (){
205- # Adds postfix to required dependencies if email alert is enabled
205+ # Adds postfix to required dependencies if email alert is enabled.
206206 if [ " ${emailalert} " == " on" ]; then
207207 if [ -f /usr/bin/mailx ]; then
208208 if [ -d /etc/exim4 ]; then
@@ -316,25 +316,25 @@ fn_found_missing_deps(){
316316}
317317
318318fn_check_loop (){
319- # Loop though required depenencies
319+ # Loop though required depenencies.
320320 for deptocheck in " ${array_deps_required[@]} "
321321 do
322322 fn_deps_detector
323323 done
324324
325- # user to be informed of any missing dependencies
325+ # user to be informed of any missing dependencies.
326326 fn_found_missing_deps
327327}
328328
329- # Generate require dependencies for debian based systems
329+ # Generate require dependencies for debian based systems.
330330fn_deps_build_debian (){
331- # Generate array of missing deps
331+ # Generate array of missing deps.
332332 array_deps_missing=()
333333
334- # # LinuxGSM requirements
334+ # LinuxGSM requirements.
335335 array_deps_required=( curl wget ca-certificates file bsdmainutils util-linux python bzip2 gzip unzip binutils bc jq )
336336
337- # All servers except ts3 require tmux
337+ # All servers except ts3 require tmux.
338338 if [ " ${shortname} " != " ts3" ]; then
339339 if [ " $( command -v tmux 2> /dev/null) " ]; then
340340 tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
@@ -343,7 +343,7 @@ fn_deps_build_debian(){
343343 fi
344344 fi
345345
346- # All servers except ts3, mumble, GTA and minecraft servers require libstdc++6 and lib32gcc1
346+ # All servers except ts3, mumble, GTA and minecraft servers require libstdc++6 and lib32gcc1.
347347 if [ " ${shortname} " != " ts3" ]&& [ " ${shortname} " != " mumble" ]&& [ " ${shortname} " != " mc" ]&& [ " ${engine} " != " renderware" ]; then
348348 if [ " ${arch} " == " x86_64" ]; then
349349 array_deps_required+=( lib32gcc1 libstdc++6:i386 )
@@ -352,9 +352,9 @@ fn_deps_build_debian(){
352352 fi
353353 fi
354354
355- # # Game Specific requirements
355+ # Game Specific requirements.
356356
357- # Natural Selection 2 - x64 only
357+ # Natural Selection 2 - x64 only.
358358 if [ " ${shortname} " == " ns2" ]; then
359359 array_deps_required+=( speex libtbb2 )
360360 # NS2: Combat
@@ -392,14 +392,16 @@ fn_deps_build_debian(){
392392 elif [ " ${shortname} " == " mc" ]; then
393393 javaversion=$( java -version 2>&1 | grep " version" )
394394 if [ " ${javaversion} " ]; then
395- javacheck=1 # Added for users using Oracle JRE to bypass the check.
395+ # Added for users using Oracle JRE to bypass the check.
396+ javacheck=1
396397 else
397398 array_deps_required+=( openjdk-8-jre-headless )
398399 fi
399400 # Project Zomboid
400401 elif [ " ${shortname} " == " pz" ]; then
401402 if [ -n " $( java -version 2>&1 | grep " version" ) " ]; then
402- javacheck=1 # Added for users using Oracle JRE to bypass the check.
403+ # Added for users using Oracle JRE to bypass the check.
404+ javacheck=1
403405 array_deps_required+=( rng-tools )
404406 else
405407 array_deps_required+=( default-jre rng-tools )
@@ -415,10 +417,10 @@ fn_deps_build_debian(){
415417 array_deps_required+=( libssl1.0.0:i386 zlib1g:i386 )
416418 # Unreal Engine
417419 elif [ " ${executable} " == " ./ucc-bin" ]; then
418- # UT2K4
420+ # UT2K4
419421 if [ -f " ${executabledir} /ut2004-bin" ]; then
420422 array_deps_required+=( libsdl1.2debian libstdc++5:i386 )
421- # UT99
423+ # UT99
422424 else
423425 array_deps_required+=( libsdl1.2debian )
424426 fi
@@ -437,11 +439,11 @@ fn_deps_build_debian(){
437439}
438440
439441fn_deps_build_redhat (){
440- # Generate array of missing deps
442+ # Generate array of missing deps.
441443 array_deps_missing=()
442444
443- # LinuxGSM requirements
444- # # CentOS 6
445+ # LinuxGSM requirements.
446+ # CentOS 6
445447 if [ " ${distroversion} " == " 6" ]; then
446448 array_deps_required=( epel-release curl wget util-linux-ng python file gzip bzip2 unzip binutils bc jq )
447449 elif [ " ${distroversion} " == " 7" ]; then
@@ -454,16 +456,17 @@ fn_deps_build_redhat(){
454456 array_deps_required=( curl wget util-linux python file gzip bzip2 unzip binutils bc jq )
455457 fi
456458
457- # All servers except ts3 require tmux
459+ # All servers except ts3 require tmux.
458460 if [ " ${shortname} " != " ts3" ]; then
459461 if [ " $( command -v tmux 2> /dev/null) " ]; then
460- tmuxcheck=1 # Added for users compiling tmux from source to bypass check.
462+ # Added for users compiling tmux from source to bypass check.
463+ tmuxcheck=1
461464 else
462465 array_deps_required+=( tmux )
463466 fi
464467 fi
465468
466- # All servers except ts3,mumble,multitheftauto and minecraft servers require glibc.i686 and libstdc++.i686
469+ # All servers except ts3, mumble, multi theft auto and minecraft servers require glibc.i686 and libstdc++.i686.
467470 if [ " ${shortname} " != " ts3" ]&& [ " ${shortname} " != " mumble" ]&& [ " ${shortname} " != " mc" ]&& [ " ${engine} " != " renderware" ]; then
468471 if [[ " ${distroname} " == * " Amazon Linux AMI" * ]]; then
469472 array_deps_required+=( glibc.i686 libstdc++64.i686 )
@@ -472,7 +475,7 @@ fn_deps_build_redhat(){
472475 fi
473476 fi
474477
475- # Game Specific requirements
478+ # Game Specific requirements.
476479
477480 # Natural Selection 2 (x64 only)
478481 if [ " ${shortname} " == " ns2" ]; then
@@ -507,7 +510,8 @@ fn_deps_build_redhat(){
507510 elif [ " ${shortname} " == " mc" ]; then
508511 javaversion=$( java -version 2>&1 | grep " version" )
509512 if [ " ${javaversion} " ]; then
510- javacheck=1 # Added for users using Oracle JRE to bypass the check.
513+ # Added for users using Oracle JRE to bypass the check.
514+ javacheck=1
511515 array_deps_required+=( rng-tools )
512516 else
513517 array_deps_required+=( java-1.8.0-openjdk rng-tools )
@@ -516,7 +520,8 @@ fn_deps_build_redhat(){
516520 elif [ " ${shortname} " == " pz" ]; then
517521 javaversion=$( java -version 2>&1 | grep " version" )
518522 if [ " ${javaversion} " ]; then
519- javacheck=1 # Added for users using Oracle JRE to bypass the check.
523+ # Added for users using Oracle JRE to bypass the check.
524+ javacheck=1
520525 array_deps_required+=( rng-tools )
521526 else
522527 array_deps_required+=( java-1.8.0-openjdk rng-tools )
@@ -559,7 +564,7 @@ if [ "${function_selfname}" == "command_install.sh" ]; then
559564 fi
560565fi
561566
562- # Filter checking in to Debian or Red Hat Based
567+ # Filter checking in to Debian or Red Hat Based.
563568info_distro.sh
564569if [ -f " /etc/debian_version" ]; then
565570 fn_deps_build_debian
0 commit comments