Author: djspiewak
Date: Tue Jun 23 00:05:11 2009
New Revision: 787477

URL: http://svn.apache.org/viewvc?rev=787477&view=rev
Log:
Support for launching shells on Windows

Modified:
    buildr/trunk/lib/buildr/core/shell.rb
    buildr/trunk/lib/buildr/groovy/shell.rb
    buildr/trunk/lib/buildr/scala/shell.rb

Modified: buildr/trunk/lib/buildr/core/shell.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/shell.rb?rev=787477&r1=787476&r2=787477&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/shell.rb (original)
+++ buildr/trunk/lib/buildr/core/shell.rb Tue Jun 23 00:05:11 2009
@@ -3,6 +3,8 @@
 module Buildr
   module Shell
     class JIRB < Base
+      SUFFIX = if Util.win_os? then '.bat' else '' end
+      
       class << self
         def lang
           :none
@@ -23,7 +25,7 @@
         end
         ENV['CLASSPATH'] += cp
         
-        system(File.expand_path('bin/jirb', jruby_home))
+        system(File.expand_path('bin/jirb' + SUFFIX, jruby_home))
       end
       
     private

Modified: buildr/trunk/lib/buildr/groovy/shell.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/groovy/shell.rb?rev=787477&r1=787476&r2=787477&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/groovy/shell.rb (original)
+++ buildr/trunk/lib/buildr/groovy/shell.rb Tue Jun 23 00:05:11 2009
@@ -3,6 +3,8 @@
 module Buildr
   module Groovy
     class GroovySH < Buildr::Shell::Base
+      SUFFIX = if Util.win_os? then '.bat' else '' end
+      
       class << self
         def lang
           :groovy
@@ -17,7 +19,7 @@
         
         cmd_args = " -classpath '#{cp}'"
         trace "groovysh #{cmd_args}"
-        system(File.expand_path('bin/groovysh', groovy_home) + cmd_args)
+        system(File.expand_path('bin/groovysh' + SUFFIX, groovy_home) + 
cmd_args)
       end
       
     private

Modified: buildr/trunk/lib/buildr/scala/shell.rb
URL: 
http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/scala/shell.rb?rev=787477&r1=787476&r2=787477&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/scala/shell.rb (original)
+++ buildr/trunk/lib/buildr/scala/shell.rb Tue Jun 23 00:05:11 2009
@@ -3,6 +3,8 @@
 module Buildr
   module Scala
     class ScalaShell < Buildr::Shell::Base
+      SUFFIX = if Util.win_os? then '.bat' else '' end
+      
       class << self
         def lang
           :scala
@@ -24,7 +26,7 @@
         cmd_args += " '#{cp}'"
         
         trace "scala #{cmd_args}"
-        system(File.expand_path('bin/scala', Scalac.scala_home) + cmd_args)
+        system(File.expand_path('bin/scala' + SUFFIX, Scalac.scala_home) + 
cmd_args)
       end
     end
   end


Reply via email to