diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-07-20 17:35:17 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-07-31 14:50:52 -0700 |
commit | 93b5fb8cd41c3330bad339129a330d1fa738019d (patch) | |
tree | 96bb9a89e7b5566623a3a04084ab8f7c7f15eee1 /client/list-tileset-order | |
parent | f4d40d38710743fa9f4f12ec035ac9b19e977253 (diff) | |
download | tools-93b5fb8cd41c3330bad339129a330d1fa738019d.tar.gz tools-93b5fb8cd41c3330bad339129a330d1fa738019d.tar.bz2 tools-93b5fb8cd41c3330bad339129a330d1fa738019d.tar.xz tools-93b5fb8cd41c3330bad339129a330d1fa738019d.zip |
Canonicalize tileset order and use external tilesets
Diffstat (limited to 'client/list-tileset-order')
-rwxr-xr-x | client/list-tileset-order | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/list-tileset-order b/client/list-tileset-order new file mode 100755 index 0000000..b8d3f85 --- /dev/null +++ b/client/list-tileset-order @@ -0,0 +1,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 |