Explorar o código

Improved formatting of the mta_resource install

Chaos %!s(int64=9) %!d(string=hai) anos
pai
achega
b6d0888a1b
Modificáronse 1 ficheiros con 6 adicións e 7 borrados
  1. 6 7
      lgsm/functions/install_mta_resources.sh

+ 6 - 7
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