From 0a6a5df900acee70548ea06925abf10e47df827c Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Fri, 2 Sep 2016 21:12:46 +0100 Subject: [PATCH] Updated md5sum --- lgsm/functions/command_dev_detect_ldd.sh | 31 ++++++++++++++++++++++++ lgsm/functions/install_server_files.sh | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 lgsm/functions/command_dev_detect_ldd.sh diff --git a/lgsm/functions/command_dev_detect_ldd.sh b/lgsm/functions/command_dev_detect_ldd.sh new file mode 100644 index 000000000..80b1d460b --- /dev/null +++ b/lgsm/functions/command_dev_detect_ldd.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# command_dev_detect_ldd.sh function +# Author: Daniel Gibbs +# Website: https://gameservermanagers.com +# Description: Automatically detects required deps using ldd. +# Can check a file or directory recursively. + +echo "=================================" +echo "LDD Requirements Checker" +echo "=================================" + +if [ -z "${filesdir}" ]; then + dir="$(dirname $(readlink -f "${BASH_SOURCE[0]}"))" +fi + +if [ -d "${filesdir}" ]; then + echo "Checking directory: " + echo "${filesdir}" +elif [ -f "${filesdir}" ]; then + echo "Checking file: " + echo "${filesdir}" +fi +echo "" + +find ${filesdir} -type f -print0 | +while IFS= read -r -d $'\0' line; do + ldd $line |grep "=>" >>"${lgsmdir}/tmp/detect_ldd.tmp" +done + +cat "${lgsmdir}/tmp/detect_ldd.tmp"|sort|uniq|sort -r --version-sort +rm "${lgsmdir}/tmp/detect_ldd.tmp" \ No newline at end of file diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 78057b680..65f32c134 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -22,7 +22,7 @@ fn_install_server_files(){ elif [ "${gamename}" == "Unreal Tournament" ]; then fileurl="http://files.gameservermanagers.com/UnrealTournament/UnrealTournament-Server-XAN-3045522-Linux.zip"; filedir="${lgsmdir}/tmp"; filename="UnrealTournament-Server-XAN-3045522-Linux.zip"; executecmd="noexecute" run="norun"; force="noforce"; md5="553fed5645a9fc623e92563049bf79f6" elif [ "${gamename}" == "GoldenEye: Source" ]; then - fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="254533d4643ad2fe6f1f3ecc4f6b5e5f" + fileurl="http://files.gameservermanagers.com/GoldenEyeSource/GoldenEye_Source_v5.0.1_full_server_linux.tar.bz2"; filedir="${lgsmdir}/tmp"; filename="GoldenEye_Source_v5.0.1_server_full_Linux.tar.bz2"; executecmd="noexecute" run="norun"; force="noforce"; md5="ea227a150300abe346e757380325f84c" fi fn_fetch_file "${fileurl}" "${filedir}" "${filename}" "${executecmd}" "${run}" "${force}" "${md5}" fn_dl_extract "${filedir}" "${filename}" "${filesdir}"