From 447eaf2936217c4a0d7cf39a3e1260d7b70a3778 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Fri, 9 May 2008 03:35:43 +0000 Subject: [PATCH] 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 git-svn-id: http://svn.openlayers.org/trunk/openlayers@7122 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- tools/update_dev_dir.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 tools/update_dev_dir.sh diff --git a/tools/update_dev_dir.sh b/tools/update_dev_dir.sh new file mode 100755 index 0000000000..c55851d6cd --- /dev/null +++ b/tools/update_dev_dir.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# Used to update http://openlayers.org/dev/ + +svn up /www/openlayers/docs/dev; + +# Get current Revision +REV=`svn info /www/openlayers/docs/dev/ | grep Revision | awk '{print $2}'` + +# Get the last svn rev +touch /tmp/ol_svn_rev +OLD_REV="o`cat /tmp/ol_svn_rev`" + +# If they're not equal, do some work. +if [ ! o$REV = $OLD_REV ]; then + + cd /www/openlayers/docs/dev/tools/ + python exampleparser.py + cd /www/openlayers/docs/dev/build + ./build.py + + cp OpenLayers.js .. + cd .. + + sed -i -e 's!../lib/OpenLayers.js!../OpenLayers.js!' examples/*.html + + # Record the revision + echo -n $REV > /tmp/ol_svn_rev +fi