blob: 6c359e29313b455e90e64f61f1d3b9d1e9b6ec52 (
plain) (
tree)
|
|
#!/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
|