mkxp/extra/make_mapping.sh

18 lines
284 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:]')"
md5=`md5sum ${file} | awk '{ print $1 }'`
echo "\"$fl\": \"${file}?h=${md5}\"," >> mapping.js
done
echo "};" >> mapping.js