summaryrefslogtreecommitdiff
path: root/client/list-tileset-order
blob: b8d3f85b7ada1dd2f9ec7396c46c0edc8f4ed78a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
DIR=${1:-maps}
for MAP in $(ls "$DIR" | grep '\.tmx$' )
do
    echo -n "${MAP%.tmx}:"
    grep '<tileset' "$DIR/$MAP" |
        while read TILESET
        do
            TILESET=${TILESET#*source=\"}
            TILESET=${TILESET%%.tsx\"*}
            TILESET=${TILESET##*/}
            echo -n " $TILESET"
        done
    echo
done