From 37bfcc7518abaa4fba7cf4058af1995d855ac25a Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Wed, 28 Aug 2024 21:06:56 +0100 Subject: [PATCH] fix extraction --- lgsm/modules/core_dl.sh | 5 ++++- lgsm/modules/install_server_files.sh | 8 -------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lgsm/modules/core_dl.sh b/lgsm/modules/core_dl.sh index 89a63eb8b..908c90f38 100644 --- a/lgsm/modules/core_dl.sh +++ b/lgsm/modules/core_dl.sh @@ -251,7 +251,10 @@ fn_dl_extract() { fi elif [ "${mime}" == "application/zip" ]; then if [ -n "${extractsrc}" ]; then - extractcmd=$(unzip -qoj -d "${extractdest}" "${local_filedir}/${local_filename}" "${extractsrc}"/*) + temp_extractdir="${tmpdir}/Xonotic" + extractcmd=$(unzip -qo "${local_filedir}/${local_filename}" "${extractsrc}/*" -d "${temp_extractdir}") + find "${temp_extractdir}/${extractsrc}" -mindepth 1 -maxdepth 1 -exec mv -t "${extractdest}" {} + + rm -rf "${temp_extractdir}" else extractcmd=$(unzip -qo -d "${extractdest}" "${local_filedir}/${local_filename}") fi diff --git a/lgsm/modules/install_server_files.sh b/lgsm/modules/install_server_files.sh index 9d1f9e07f..57ce58ca7 100644 --- a/lgsm/modules/install_server_files.sh +++ b/lgsm/modules/install_server_files.sh @@ -224,14 +224,6 @@ fn_install_server_files() { run="norun" force="noforce" md5="93705e165550c97484678236749198a4" - elif [ "${shortname}" == "xnt" ]; then - remote_fileurl="https://dl.xonotic.org/xonotic-0.8.6.zip" - local_filedir="${tmpdir}" - local_filename="xonotic-0.8.6.zip" - chmodx="nochmodx" - run="norun" - force="noforce" - md5="32cdf9f90930e4599177dafc41adda48" elif [ "${shortname}" == "zmr" ]; then remote_fileurl="http://linuxgsm.download/ZombieMasterReborn/zombie_master_reborn_b6_1.tar.xz" local_filedir="${tmpdir}"