]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
xonotic.subr: automatically compress demos after terminating the game. matthiaskrgr/auto_compress_demos
authorMatthias Krüger <matthias.krueger@famsik.de>
Thu, 17 Dec 2015 18:58:25 +0000 (19:58 +0100)
committerMatthias Krüger <matthias.krueger@famsik.de>
Thu, 17 Dec 2015 18:58:25 +0000 (19:58 +0100)
misc/tools/all/xonotic.subr

index 6f66d62e76048a755f8ca3afe7e8e4ac1e08311f..20cc9b0eca3145fdc910b2f6cd04393abd41c9b6 100644 (file)
@@ -348,6 +348,10 @@ case "$cmd" in
                        fi
                        exit 1
                fi
+               echo "compressing"
+               cd ~/.xonotic/data/demos/
+#              pwd
+               tar --remove-files -cf - `find  ~/.xonotic/data/demos/  -type f | grep "\.dem$"`    | xz -9 -c - > "games_`date +%Y_%m_%d__%H:%M:%S`.tar.xz" ;  
                ;;
        help)
                $ECHO "  $SELF compile [-c] [-qc] [-r|-p] [-0] [sdl|glx|wgl|dedicated]"