From f766f2a608970f8f548229917ee59cdd0f3bc926 Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Fri, 28 Oct 2022 21:35:03 +0300 Subject: [PATCH] [Arch] Update clean-up logic --- arch/updatewine_arch.sh | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/arch/updatewine_arch.sh b/arch/updatewine_arch.sh index 7815640..1c97b77 100755 --- a/arch/updatewine_arch.sh +++ b/arch/updatewine_arch.sh @@ -101,18 +101,12 @@ function INFO_SEP() { printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - ; ########################################################### -# If the script is interrupted (Ctrl+C/SIGINT), do the following - -function Arch_intCleanup() { - rm -rf ${ARCH_BUILDROOT}/{0-wine-staging-git/{wine-patches,*.tar.xz,*.sig},0-dxvk-git/{dxvk-git,*.tar.xz,*.sig}} - exit 0 +function cleanUp() { + rm -rf ${ARCH_BUILDROOT}/*/{pkg,src,*.tar.xz,*.patch,*.diff,*.sig} } # Allow interruption of the script at any time (Ctrl + C) -trap "Arch_intCleanup" INT - -# Error event -#trap "Arch_intCleanup" ERR +trap "cleanUp" SIGINT SIGTERM SIGQUIT ########################################################### @@ -382,14 +376,6 @@ function check_gitOverride_wine() { ########################################################### -# Remove any existing pkg,src or tar.xz packages left by previous pacman commands - -function cleanUp() { - rm -rf ${ARCH_BUILDROOT}/*/{pkg,src,*.tar.xz,*.patch,*.diff,*.sig} -} - -########################################################### - # Build & install package function build_pkg() {