From 876e0dfd819095331ee41b3f7c38de481e66d1f5 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 24 Feb 2011 23:48:24 +0000 Subject: [PATCH] Fix build script on python before 2.6, and update_dev_dir now compiles with closure instead of jsmin. git-svn-id: http://svn.openlayers.org/trunk/openlayers@11449 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- build/build.py | 9 ++++++++- tools/update_dev_dir.sh | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/build/build.py b/build/build.py index 24a2f23846..58a4900668 100755 --- a/build/build.py +++ b/build/build.py @@ -72,4 +72,11 @@ if __name__ == '__main__': opt = optparse.OptionParser(usage="%s [options] [config_file] [output_file]\n Default config_file is 'full.cfg', Default output_file is 'OpenLayers.js'") opt.add_option("-c", "--compressor", dest="compressor", help="compression method: one of 'jsmin', 'minimize', or 'none'", default="jsmin") (options, args) = opt.parse_args() - build(*args, options=options) + if not len(args): + build(options=options) + elif len(args) == 1: + build(args[0], options=options) + elif len(args) == 2: + build(args[0], args[1], options=options) + else: + print "Wrong number of arguments" diff --git a/tools/update_dev_dir.sh b/tools/update_dev_dir.sh index 9de3f3b38e..0681de1845 100755 --- a/tools/update_dev_dir.sh +++ b/tools/update_dev_dir.sh @@ -18,7 +18,7 @@ if [ ! o$REV = $OLD_REV ]; then cd /osgeo/openlayers/docs/dev/tools/ python exampleparser.py cd /osgeo/openlayers/docs/dev/build - ./build.py tests.cfg + ./build.py -c closure tests.cfg cp OpenLayers.js .. cd ..