clean up pk3s properly
authorRudolf Polzer <divVerent@xonotic.org>
Wed, 29 Sep 2010 13:34:16 +0000 (15:34 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Wed, 29 Sep 2010 13:34:16 +0000 (15:34 +0200)
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"
+
+                       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"
+
                        if ! $getthemap_fail; then
                                allmaps screenshotthemap "$REFNAME" "$HASH" "$http_url"
                                touch "$screenshot_cachedir/$HASH"