From b6d0888a1b47af542f36aaa8657bfc1325f23fd9 Mon Sep 17 00:00:00 2001 From: Chaos Date: Wed, 4 Jan 2017 23:23:19 -0600 Subject: [PATCH] Improved formatting of the mta_resource install --- lgsm/functions/install_mta_resources.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lgsm/functions/install_mta_resources.sh b/lgsm/functions/install_mta_resources.sh index 042e7e21c..97d17c940 100644 --- a/lgsm/functions/install_mta_resources.sh +++ b/lgsm/functions/install_mta_resources.sh @@ -1,5 +1,5 @@ #!/bin/bash -# LGSM install_ts3db.sh function +# LGSM install_mta_resources.sh function # Author: Daniel Gibbs # Contributor: PhilPhonic # Website: https://gameservermanagers.com @@ -11,11 +11,10 @@ local function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))" fn_install_libmysqlclient16(){ echo "" - echo "checking if libmysqlclient16 is installed" + echo "Checking if libmysqlclient16 is installed" echo "=================================" sleep 1 - ldd /usr/lib/libmysqlclient.so.16 | grep "libmysqlclient.so.16 => not found" - if [ $? -eq 0 ]; then + if [ ! -f /usr/lib/libmysqlclient.so.16 ]; then echo "libmysqlclient16 not installed. Installing.." fileurl="https://nightly.mtasa.com/files/modules/64/libmysqlclient.so.16"; filedir="/usr/lib/"; filename="libmysqlclient.so.16"; executecmd="noexecute" run="norun"; force="noforce"; md5="6c188e0f8fb5d7a29f4bc413b9fed6c2" fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" @@ -25,12 +24,12 @@ fn_install_libmysqlclient16(){ fn_install_resources(){ echo "" - echo "installing default resources" + echo "Installing Default Resources" echo "=================================" - fileurl="http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip"; filedir="${tempdir}"; filename="multitheftauto_resources.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="97a587509698f7f010bcd6e5c6dd9c31" + fileurl="http://mirror.mtasa.com/mtasa/resources/mtasa-resources-latest.zip"; filedir="${tmpdir}"; filename="multitheftauto_resources.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="97a587509698f7f010bcd6e5c6dd9c31" fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" fn_dl_extract "${filedir}" "${filename}" "${resourcesdir}" - echo "default resources installed." + echo "Default Resources Installed." } fn_install_libmysqlclient16