diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index 57f432ec4..165c129d6 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -188,6 +188,9 @@ if [ -n "$(command -v dpkg-query)" ]; then else array_deps_required+=( libsdl1.2debian bzip2 ) fi + # Unreal Tournament + elif [ "${gamename}" == "Unreal Tournament" ]; then + array_deps_required+=( unzip ) fi fn_deps_email fn_check_loop @@ -243,6 +246,10 @@ elif [ -n "$(command -v yum)" ]; then else array_deps_required+=( SDL.i686 bzip2 ) fi + # Unreal Tournament + elif [ "${gamename}" == "Unreal Tournament" ]; then + array_deps_required+=( unzip ) + fi fi fn_deps_email fn_check_loop diff --git a/lgsm/functions/core_dl.sh b/lgsm/functions/core_dl.sh index 52155dc49..0c1e0a76b 100644 --- a/lgsm/functions/core_dl.sh +++ b/lgsm/functions/core_dl.sh @@ -44,7 +44,7 @@ fn_dl_md5(){ fi } -# Extracts bzip2 or gzip files +# Extracts bzip2 or gzip or zip files # Extracts can be defined in code like so: # fn_dl_extract "${filedir}" "${filename}" "${extractdir}" # fn_dl_extract "/home/gameserver/lgsm/tmp" "file.tar.bz2" "/home/gamserver/serverfiles" @@ -61,6 +61,8 @@ fn_dl_extract(){ tarcmd=$(tar -zxf "${filedir}/${filename}" -C "${extractdir}") elif [ "${mime}" == "application/x-bzip2" ]; then tarcmd=$(tar -jxf "${filedir}/${filename}" -C "${extractdir}") + elif [ "${mime}" == "application/zip" ]; then + tarcmd=$(unzip -d "${extractdir}" "${filedir}/${filename}") fi local exitcode=$? if [ ${exitcode} -ne 0 ]; then