OpenLayers OpenLayers

root/trunk/openlayers/tools/update_dev_dir.sh

Revision 7122, 0.6 kB (checked in by crschmidt, 4 months ago)

add smarter tool for updating the dev dir on OL.org in a better way. Specifically:

  • Check whether the reision has changed
  • if it has:
    • rebuild the examples.js
    • Rebuild the singlefile, copy it
    • Change all the examples to use the singlefile
    • Record the most recent rev
  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 # Used to update http://openlayers.org/dev/
4
5 svn up /www/openlayers/docs/dev;
6
7 # Get current Revision
8 REV=`svn info /www/openlayers/docs/dev/ | grep Revision | awk '{print $2}'`
9
10 # Get the last svn rev
11 touch /tmp/ol_svn_rev
12 OLD_REV="o`cat /tmp/ol_svn_rev`"
13
14 # If they're not equal, do some work.
15 if [ ! o$REV = $OLD_REV ]; then
16
17     cd /www/openlayers/docs/dev/tools/
18     python exampleparser.py
19     cd /www/openlayers/docs/dev/build
20     ./build.py
21    
22     cp OpenLayers.js ..
23     cd ..
24    
25     sed -i -e 's!../lib/OpenLayers.js!../OpenLayers.js!' examples/*.html
26
27     # Record the revision
28     echo -n $REV > /tmp/ol_svn_rev
29 fi    
Note: See TracBrowser for help on using the browser.