diff options
author | Ben Longbons <b.r.longbons@gmail.com> | 2013-12-14 10:24:48 -0800 |
---|---|---|
committer | Ben Longbons <b.r.longbons@gmail.com> | 2013-12-14 10:24:48 -0800 |
commit | 78875e3c896656458d000c1987b1b0856fdb2bbe (patch) | |
tree | 9da2a6949fec98f2f48fc5f3f3799829a139be6c /client/edit-map-tileset-names.sh | |
parent | bf2e24c6ed00e67466c1dbf967c23eef29aaf73e (diff) | |
parent | 709373a850e6c96aa03b56c8e0865a09db91b341 (diff) | |
download | tools-78875e3c896656458d000c1987b1b0856fdb2bbe.tar.gz tools-78875e3c896656458d000c1987b1b0856fdb2bbe.tar.bz2 tools-78875e3c896656458d000c1987b1b0856fdb2bbe.tar.xz tools-78875e3c896656458d000c1987b1b0856fdb2bbe.zip |
Merge remote-tracking branch 'origin/client'
Diffstat (limited to 'client/edit-map-tileset-names.sh')
-rwxr-xr-x | client/edit-map-tileset-names.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/edit-map-tileset-names.sh b/client/edit-map-tileset-names.sh new file mode 100755 index 0000000..6c359e2 --- /dev/null +++ b/client/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 |