mkxp/extra/make_mapping.sh

18 lines
286 B
Bash
Raw Normal View History

2020-05-07 06:57:51 +00:00
#!/bin/bash
echo "var mapping = {" > mapping.js
for file in {*,*/*,*/**/*}
do
filename="${file%.*}"
fl="$(echo "$filename" | tr '[:upper:]' '[:lower:]')"
2020-05-07 14:39:56 +00:00
md5=`md5sum "${file}" | awk '{ print $1 }'`
2020-05-07 06:57:51 +00:00
echo "\"$fl\": \"${file}?h=${md5}\"," >> mapping.js
done
echo "};" >> mapping.js