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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Dec 7 06:20:30 EST 2011


Author: martinl
Date: 2011-12-07 03:20:30 -0800 (Wed, 07 Dec 2011)
New Revision: 49601

Modified:
   grass/branches/develbranch_6/gui/scripts/g.extension.py
Log:
g.extension.py: create copy of executable also for bat files

Modified: grass/branches/develbranch_6/gui/scripts/g.extension.py
===================================================================
--- grass/branches/develbranch_6/gui/scripts/g.extension.py	2011-12-07 11:04:47 UTC (rev 49600)
+++ grass/branches/develbranch_6/gui/scripts/g.extension.py	2011-12-07 11:20:30 UTC (rev 49601)
@@ -405,7 +405,7 @@
     src = None
     if sys.platform == 'win32':
         bin_ext = '.exe'
-        sct_ext  = '.py'
+        sct_ext  = '.bat'
     else:
         bin_ext = sct_ext = ''
     
@@ -413,10 +413,15 @@
                                    options['extension'] + bin_ext)):
         src = os.path.join(options['prefix'], 'bin', options['extension']) + bin_ext
         dst = os.path.join(options['prefix'], options['extension']) + bin_ext
-    elif os.path.exists(os.path.join(options['prefix'], 'scripts',
-                                     options['extension'] + sct_ext)):
-        src = os.path.join(options['prefix'], 'scripts', options['extension']) + sct_ext
-        dst = os.path.join(options['prefix'], options['extension']) + sct_ext
+    else:
+        if sys.platform == 'win32':
+            pdir = 'bin'
+        else:
+            pdir = 'scripts'
+        if os.path.exists(os.path.join(options['prefix'], pdir,
+                                       options['extension'] + sct_ext)):
+            src = os.path.join(options['prefix'], pdir, options['extension']) + sct_ext
+            dst = os.path.join(options['prefix'], options['extension']) + sct_ext
     
     if src and not os.path.exists(dst):
         if sys.platform == 'win32':



More information about the grass-commit mailing list