9 rm -rf
$(INSTALLDIR
)/www
10 mkdir
-p
$(INSTALLDIR
)/www
12 cp
*.gif
*.png
*.ico robots.txt
$(INSTALLDIR
)/www
14 # squish some of the files by trimming whitespace...
16 for F in
*.
{js
,jsx
}; do \
17 sed
'/^\/\*\s*$$/,/\*\//! { s/^\s\+//; s/\s\+$$//; /^\/\/ --\+\s*/d; /^$$/d }' < $$F > $(INSTALLDIR
)/www
/$$F; \
21 sed
'/^\/\*\s*$$/,/\*\//! { s/\s\+/ /g; s/^\s\+//; s/\s\+$$//; /^$$/d }' < $$F > $(INSTALLDIR
)/www
/$$F; \
24 # remove "debug.js" references, convert color.css -> nv().css, remove comments
25 # in between REMOVE-BEGIN and REMOVE-END, and compress whitespace
27 for F in
*.
{asp
,svg
}; do \
28 sed
-e
"/REMOVE-BEGIN/,/REMOVE-END/d" \
29 -e
"s,<script[^>]\+debug\.js[^>]\+></script>,," \
30 -e
"s,color\.css,<% nv('web_css'); %>\.css," \
31 -e
"s,<!-- / / / -->,," \
33 -e
"/^<!--$$/,/^-->$$/! { s,^\s\+, , }" $$F > $(INSTALLDIR
)/www
/$$F; \
38 # make sure old and debugging crap is gone
39 @
rm -f
$(INSTALLDIR
)/debug.js
40 @
rm -f
$(INSTALLDIR
)/www
/*-x.
*
41 @
rm -f
$(INSTALLDIR
)/www
/*-old.
*
42 @
rm -f
$(INSTALLDIR
)/www
/color.css
44 chmod
0644 $(INSTALLDIR
)/www
/*