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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to