From: bones_was_here Date: Sun, 12 Apr 2020 22:02:24 +0000 (+1000) Subject: Remove temp dir at ^C, kill, terminal closed, broken pipe, segfault, etc as well... X-Git-Tag: xonotic-v0.8.5~94^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dee2bf9bd9f453220f9913137cb3d407afcb25f4;p=xonotic%2Fxonotic.git Remove temp dir at ^C, kill, terminal closed, broken pipe, segfault, etc as well as script exit --- diff --git a/misc/tools/all/xonotic.subr b/misc/tools/all/xonotic.subr index 9eb9bc0d..cb3b6753 100644 --- a/misc/tools/all/xonotic.subr +++ b/misc/tools/all/xonotic.subr @@ -395,6 +395,7 @@ case "$cmd" in ;; serverbench) # TODO(rpolzer): Why does :anticheat: output differ? Total game time differs? Why? + trap "rm -rf .serverbench_temp" 0 1 2 3 11 13 15 mkdir -p .serverbench_temp verbose "$SELF" run dedicated "$@" -noconfig -userdir .serverbench_temp +exec serverbench.cfg |\ tee /dev/stderr |\ @@ -402,7 +403,6 @@ case "$cmd" in grep -v '^:gamestart:' |\ grep -v '^:anticheat:' |\ md5sum - rm -rf .serverbench_temp ;; *) handled=false