gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: rev 46927 - gump/trunk/python/gump/build
Date Mon, 20 Sep 2004 07:36:02 GMT
Author: bodewig
Date: Mon Sep 20 00:36:01 2004
New Revision: 46927

Modified:
   gump/trunk/python/gump/build/script.py
Log:
Try to make <script> extension optional if a file by the name of the
script (without extension) exists.  Simply adding what Sam suggested.


Modified: gump/trunk/python/gump/build/script.py
==============================================================================
--- gump/trunk/python/gump/build/script.py	(original)
+++ gump/trunk/python/gump/build/script.py	Mon Sep 20 00:36:01 2004
@@ -100,12 +100,13 @@
         # Where to run this:
         basedir = script.getBaseDirectory() or project.getBaseDirectory()
 
-        # Add .sh  or .bat as appropriate to platform
         scriptfullname=script.getName()
-        if not os.name == 'dos' and not os.name == 'nt':
-            scriptfullname += '.sh'
-        else:
-            scriptfullname += '.bat'
+        if not os.path.exists(os.path.join(basedir, scriptfullname)):
+            # Add .sh  or .bat as appropriate to platform
+            if not os.name == 'dos' and not os.name == 'nt':
+                scriptfullname += '.sh'
+            else:
+                scriptfullname += '.bat'
   
         # The script
         scriptfile=os.path.abspath(os.path.join(basedir, scriptfullname))
@@ -124,4 +125,4 @@
         Preview what this would do
         """
         command=self.getScriptCommand(project,languageHelper) 
-        command.dump()
\ No newline at end of file
+        command.dump()

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message