]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/xonotic-map-compiler-autobuild
fix index building
[xonotic/xonotic.git] / misc / tools / xonotic-map-compiler-autobuild
index 23c7dca547a7ace6dfcd407b6dd0a47d694d3a6a..91626deaf0969682dab02b79efa36592ad7df49d 100755 (executable)
@@ -16,10 +16,16 @@ allmaps()
 {
        commithash=$1
        shift
-       for F in `git ls-files "$commithash" -- maps/\*.map.options`; do
-               M=${F#maps/}
-               M=${M%.map.options}
-               blobhash=`git rev-parse --revs-only "$commithash:maps/$M.map.options" || true`-`git rev-parse --revs-only "$commithash:maps/$M.map" || true`
+       for F in `git show "${commithash}:maps/"`; do
+               case "$F" in
+                       *.map.options)
+                               ;;
+                       *)
+                               continue
+                               ;;
+               esac
+               M=${F%.map.options}
+               blobhash=`git rev-parse --revs-only "${commithash}:maps/$M.map.options" || true`-`git rev-parse --revs-only "${commithash}:maps/$M.map" || true`
                case "$blobhash" in
                        -*)
                                ;;
@@ -306,9 +312,9 @@ case "$1" in
                git checkout -f master
                ;;
        screenshot)
-               runmakeindex > branches.idx.new
-               rsync -vaSHP "$branches.idx.new" "$url_ssh""branches.idx.new"
-               rm -f branches.idx.new
+               runmakeindex > "branches.idx.new"
+               rsync -vaSHP "branches.idx.new" "$url_ssh""branches.idx.new"
+               rm -f "branches.idx.new"
                cd data/xonotic-maps.pk3dir
                branches | while read -r HASH TYPE REFNAME; do
                        if [ -f "$screenshot_cachedir/$HASH" ]; then