diff options
Diffstat (limited to 'tools/edit-all-to-export-tilesets.sh')
-rwxr-xr-x | tools/edit-all-to-export-tilesets.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/edit-all-to-export-tilesets.sh b/tools/edit-all-to-export-tilesets.sh new file mode 100755 index 00000000..7be3411f --- /dev/null +++ b/tools/edit-all-to-export-tilesets.sh @@ -0,0 +1,19 @@ +#!/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 + + |