summaryrefslogblamecommitdiff
path: root/client/edit-all-to-export-tilesets.sh
blob: 7be3411f9476a56382d5beda73b126c507bc89e7 (plain) (tree)


















                                            
#!/bin/bash
for MAP in $(ls maps | grep '\.tmx$')
do
    TILESETS=$(
        grep '<tileset' "maps/$MAP" |
            while read TILESET
            do
                TILESET=${TILESET#*name=\"}
                TILESET=${TILESET%%\"*}
                echo tilesets/${TILESET}.tsx
            done
    )
    rm -f ${TILESETS}
    (cd tilesets; tiled ../maps/$MAP;)
    git add -N tilesets/
    git add --patch
done