From e561a86acdce50ff1758feaf3cfdafe1800ca15a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 31 Jan 2016 22:46:06 +0000 Subject: [PATCH] Added to installer --- functions/check_deps.sh | 14 ++++++++++---- functions/command_install.sh | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/functions/check_deps.sh b/functions/check_deps.sh index 11a76d54b..d14d813bb 100644 --- a/functions/check_deps.sh +++ b/functions/check_deps.sh @@ -4,11 +4,11 @@ # Website: http://gameservermanagers.com lgsm_version="310116" -# Description: Checks that the require dependencies are installed for LGSM +# Description: Checks that the requires dependencies are installed for LGSM. fn_deps_detector(){ -# Checks is dependency is missing +# Checks if dependency is missing if [ -n "$(command -v dpkg-query)" ]; then dpkg-query -W -f='${Status}' ${deptocheck} 2>/dev/null| grep -q -P '^install ok installed$' depstatus=$? @@ -19,11 +19,11 @@ fi if [ "${depstatus}" == "0" ]; then missingdep=0 else - # if missing dependency is flagged + # if missing dependency is found missingdep=1 fi -# Add missing dependencies are added to array_deps_missing array +# Missing dependencies are added to array_deps_missing if [ "${missingdep}" == "1" ]; then array_deps_missing+=("${deptocheck}") fi @@ -87,6 +87,12 @@ fn_check_loop(){ fn_found_missing_deps } +if [ "${function_selfname}" == "command_install.sh" ]; then +echo "Server Directory" +echo "=================================" +fi + + # Check will only run if using apt-get or yum if [ -n "$(command -v dpkg-query)" ]; then # Generate array of missing deps diff --git a/functions/command_install.sh b/functions/command_install.sh index f2021f071..791cb160d 100644 --- a/functions/command_install.sh +++ b/functions/command_install.sh @@ -9,7 +9,7 @@ function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" check.sh install_header.sh install_serverdir.sh - +check_deps.sh # Download and install if [ "${gamename}" == "Unreal Tournament 2004" ]; then install_dl_ut2k4.sh