chmod options reference
[dygraphs.git] / push-to-web.sh
1 #!/bin/bash
2 # This script generates the combined JS file, pushes all content to a web site
3 # and then reverts the combined file.
4
5 if [ "$1" == "" ] ; then
6 echo "usage: $0 destination"
7 exit 1
8 fi
9
10 set -x
11 site=$1
12 # Produce dygraph-combined.js.
13 ./generate-combined.sh
14
15 # Generate documentation.
16 ./generate-documentation.py > docs/options.html
17 chmod a+r docs/options.html
18 if [ -s docs/options.html ] ; then
19 ./generate-jsdoc.sh
20
21 # Copy everything to the site.
22 rsync -avzr gallery common tests jsdoc experimental plugins $site \
23 && \
24 rsync -avzr dygraph*.js gadget.xml excanvas.js thumbnail.png screenshot.png docs/ $site/
25 else
26 echo "generate-documentation.py failed"
27 fi
28
29 # Revert changes to dygraph-combined.js and docs/options.html
30 git checkout dygraph-combined.js
31 rm docs/options.html