mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
build script fiddling
This commit is contained in:
@@ -34,8 +34,9 @@ sed -i -e "s|;}|}|g" build/m-$revision.css
|
||||
# put CSS inline
|
||||
css=`cat build/$revision.css`
|
||||
mobilecss=`cat build/m-$revision.css`
|
||||
sed -i -e "s|<link rel=stylesheet media='only screen and (max-device-width: 480px)' href=mobile.css>|<style>@media screen and (max-device-width:480px)\{${mobilecss}\}</style>|g" -e "s|<link rel=stylesheet href=dip3.css>|<style>${css}</style>|g" -e "s|</style><style>||g" build/*.html
|
||||
#sed -i -e "s|href=mobile.css|href=http://wearehugh.com/dip3/m-${revision}.css|g" build/*.html
|
||||
#sed -i -e "s|<link rel=stylesheet media='only screen and (max-device-width: 480px)' href=mobile.css>|<style>@media screen and (max-device-width:480px)\{${mobilecss}\}</style>|g" -e "s|<link rel=stylesheet href=dip3.css>|<style>${css}</style>|g" -e "s|</style><style>||g" build/*.html
|
||||
sed -i -e "s|<link rel=stylesheet href=dip3.css>|<style>${css}</style>|g" -e "s|</style><style>||g" build/*.html
|
||||
sed -i -e "s|href=mobile.css|href=http://wearehugh.com/dip3/m-${revision}.css|g" build/*.html
|
||||
|
||||
# JS will be served from a separate domain
|
||||
sed -i -e "s|dip3\.js|http://wearehugh.com/dip3/${revision}.js|g" build/*.html
|
||||
@@ -52,5 +53,5 @@ sed -i -e "s|href=index.html|href=/|g" build/*.html
|
||||
chmod 644 build/*.html build/*.css build/*.js build/examples/*.py build/examples/*.txt build/*.txt
|
||||
|
||||
# ship it!
|
||||
rsync -essh -avzP build/$revision.js build/html5.js diveintomark.org:~/web/wearehugh.com/dip3/
|
||||
rsync -essh -avzP build/$revision.js build/html5.js build/m-$revision.css diveintomark.org:~/web/wearehugh.com/dip3/
|
||||
rsync -essh -avzP build/*.html build/examples build/*.txt diveintomark.org:~/web/diveintopython3.org/
|
||||
|
||||
Reference in New Issue
Block a user