[GRASS-SVN] r49936 - grass/branches/develbranch_6/gui/scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Dec 27 13:06:24 EST 2011


Author: martinl
Date: 2011-12-27 10:06:24 -0800 (Tue, 27 Dec 2011)
New Revision: 49936

Modified:
   grass/branches/develbranch_6/gui/scripts/g.extension.py
Log:
g.extension.py: backport url release/svn 


Modified: grass/branches/develbranch_6/gui/scripts/g.extension.py
===================================================================
--- grass/branches/develbranch_6/gui/scripts/g.extension.py	2011-12-27 18:05:29 UTC (rev 49935)
+++ grass/branches/develbranch_6/gui/scripts/g.extension.py	2011-12-27 18:06:24 UTC (rev 49936)
@@ -420,12 +420,16 @@
 
 # install extension on MS Windows
 def install_extension_win():
-    ### TODO: do not use hardcoded url
+    ### TODO: do not use hardcoded url - http://wingrass.fsv.cvut.cz/grassXX/addonsX.X.X
     version = grass.version()['version'].split('.')
-    url = "http://wingrass.fsv.cvut.cz/grass%s%s/addons/" % (version[0], version[1])
     grass.message(_("Downloading precompiled GRASS Addons <%s>...") % options['extension'])
+    url = "http://wingrass.fsv.cvut.cz/grass%s%s/addons" % (version[0], version[1])
+    if version[2][1:] != 'svn':
+        url += '%s.%s.%s' % (version[0], version[1], version[2])
+    grass.debug("url=%s" % url, 1)
+    
     try:
-        f = urlopen(url + options['extension'] + '.zip')
+        f = urlopen(url + '/' + options['extension'] + '.zip')
         
         # create addons dir if not exists
         if not os.path.exists(options['prefix']):



More information about the grass-commit mailing list