[GRASS-SVN] r49876 - grass/branches/releasebranch_6_4/gui/scripts

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 23 05:10:13 EST 2011


Author: martinl
Date: 2011-12-23 02:10:13 -0800 (Fri, 23 Dec 2011)
New Revision: 49876

Modified:
   grass/branches/releasebranch_6_4/gui/scripts/g.extension.py
Log:
g.extension.py: define full download path for release - eg. http://wingrass.fsv.cvut.cz/grass64/addons6.4.2

Modified: grass/branches/releasebranch_6_4/gui/scripts/g.extension.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/scripts/g.extension.py	2011-12-23 09:38:07 UTC (rev 49875)
+++ grass/branches/releasebranch_6_4/gui/scripts/g.extension.py	2011-12-23 10:10:13 UTC (rev 49876)
@@ -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