Fix build.py to not break if someone passes in a config file name with '.cfg'

already on it. (Closes #839) Thanks for the suggestion / patch TJCRI! 


git-svn-id: http://svn.openlayers.org/trunk/openlayers@4099 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-08-29 04:11:03 +00:00
parent 807449046b
commit cc0f90a5ad

View File

@@ -10,7 +10,12 @@ configFilename = "library.cfg"
outputFilename = "OpenLayers.js"
if len(sys.argv) > 1:
configFilename = sys.argv[1] + ".cfg"
configFilename = sys.argv[1]
extension = configFilename[-4:]
if extension != ".cfg":
configFilename = sys.argv[1] + ".cfg"
if len(sys.argv) > 2:
outputFilename = sys.argv[2]