]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
clean up pk3s properly
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index 4733758c57d68e019ad98d6a65b02d2dbbdc31db..3289aef93ebbd6bff80f5a77c6de9dcc6047ec42 100755 (executable)
@@ -263,7 +263,17 @@ case "$1" in
                        git reset --hard
                        git clean -xfd
                        git checkout -f "$HASH"
                        git reset --hard
                        git clean -xfd
                        git checkout -f "$HASH"
+
+                       cd ../..
+                       mkdir -p "$bspdir" "$bspdir.old"
+                       for b in "$bspdir"/*-????????????????????????????????????????-????????????????????????????????????????.pk3; do
+                               if [ -e "$b" ]; then
+                                       mv "$b" "$bspdir.old"/
+                               fi
+                       done
+                       cd data/xonotic-maps.pk3dir
                        allmaps getthemap "$http_url" "$bspdir.old" "$bspdir"
                        allmaps getthemap "$http_url" "$bspdir.old" "$bspdir"
+
                        if ! $getthemap_fail; then
                                allmaps screenshotthemap "$REFNAME" "$HASH" "$http_url"
                                touch "$screenshot_cachedir/$HASH"
                        if ! $getthemap_fail; then
                                allmaps screenshotthemap "$REFNAME" "$HASH" "$http_url"
                                touch "$screenshot_cachedir/$HASH"