Merge pull request #526 from prometheus/lightening-embedding

Dramatically decrease resources for file embedding.
This commit is contained in:
juliusv 2015-02-13 17:55:31 +01:00
commit 0ae2c1fc18
1 changed files with 3 additions and 3 deletions

View File

@ -21,9 +21,9 @@ do
find . -type f \! -name \*.map \! -name bootstrap.js \! -name bootstrap-theme.css \! -name bootstrap.css | while read file
do
name=$(echo "${file}"|sed 's|\.\/||')
echo "\"$name\": {"
gzip -9 -c "${file}" | xxd -p |sed 's/\(..\)/0x\1, /g'
echo "},"
echo -n "\"$name\": []byte(\""
gzip -9 -c "${file}" | xxd -p | tr -d '\n' | sed 's/\(..\)/\\x\1/g'
echo "\"),"
echo
done
echo "},"