]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
Remove temp dir at ^C, kill, terminal closed, broken pipe, segfault, etc as well...
authorbones_was_here <bones_was_here@yahoo.com.au>
Sun, 12 Apr 2020 22:02:24 +0000 (08:02 +1000)
committerbones_was_here <bones_was_here@yahoo.com.au>
Sun, 12 Apr 2020 22:02:24 +0000 (08:02 +1000)
misc/tools/all/xonotic.subr

index 9eb9bc0d80c8e5a5b933af6cb845c0f3d60dc2de..cb3b67537fadc1955d7908e9cd3e8452891e03db 100644 (file)
@@ -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