2 # This script generates the combined JS file, pushes all content to a web site
3 # and then reverts the combined file.
5 if [ "$1" == "" ] ; then
6 echo "usage: $0 destination"
13 # Produce dygraph-combined.js and dygraph-combined-dev.js
14 .
/generate-combined.sh
15 .
/generate-combined.sh cat-dev
> dygraph-combined-dev.js
17 # Generate documentation.
18 .
/generate-documentation.py
> docs
/options.html
19 chmod a
+r docs
/options.html
20 if [ -s docs
/options.html
] ; then
22 .
/generate-download.py
> docs
/download.html
24 temp_dir
=$
(mktemp
-d
/tmp
/dygraphs-docs.XXXX
)
26 .
/ssi_expander.py
$temp_dir
29 # Make sure everything will be readable on the web.
30 # This is like "chmod -R a+rX", but excludes the .git directory.
31 find .
-path .
/.git
-prune
-o
-print |
xargs chmod a
+rX
33 # Copy everything to the site.
34 rsync
-avzr gallery common tests jsdoc experimental plugins datahandler polyfills extras
$site \
36 rsync
-avzr
--copy-links dashed-canvas.js dygraph
*.js gadget.xml thumbnail.png screenshot.png
$temp_dir/* $site/
38 echo "generate-documentation.py failed"
41 # Revert changes to dygraph-combined.js and docs.
42 make clean-combined-test
43 rm dygraph-combined-dev.js
44 git checkout docs
/download.html