diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2012-07-20 16:18:36 -0700 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2012-07-20 16:18:36 -0700 |
commit | 6b3901fa566db879ff289057f123d719854a5e66 (patch) | |
tree | e80c3d23ff391b4311a12d0e3e787b296c6f9862 /tools | |
parent | 822a22442db6e7605abe88a71a9c009a9fcd8639 (diff) | |
download | clientdata-6b3901fa566db879ff289057f123d719854a5e66.tar.gz clientdata-6b3901fa566db879ff289057f123d719854a5e66.tar.bz2 clientdata-6b3901fa566db879ff289057f123d719854a5e66.tar.xz clientdata-6b3901fa566db879ff289057f123d719854a5e66.zip |
Canonicalize tileset names.
Also remove some executable bits
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/edit-map-tileset-names.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/edit-map-tileset-names.sh b/tools/edit-map-tileset-names.sh new file mode 100755 index 00000000..6c359e29 --- /dev/null +++ b/tools/edit-map-tileset-names.sh @@ -0,0 +1,15 @@ +#!/bin/bash +for MAP in maps/*.tmx +do + grep '<tileset\|<image' "$MAP" | + while read TILESET && read IMAGE + do + LINE=$TILESET + TILESET=${TILESET#*name=\"} + TILESET=${TILESET%%\"*} + IMAGE=${IMAGE#*source=\"} + IMAGE=${IMAGE%%.png\"*} + IMAGE=${IMAGE##*/} + sed "/$LINE/s/$TILESET/$IMAGE/" -i "$MAP" + done +done |