Use file mapping

This commit is contained in:
Varun Patil 2020-05-07 12:27:51 +05:30
parent 80df1ee771
commit fd6375e17d
8 changed files with 58 additions and 32 deletions

17
extra/make_mapping.sh Executable file
View file

@ -0,0 +1,17 @@
#!/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