Beware that you're technically detecting both windows and mac (darwin)
with /win/. You might want to check for win32 (or, i suppose, win64?)
instead.

- james

On 7/2/06, Sean O'Halpin <sean.ohalpin / gmail.com> wrote:
> Windoze equivalent inserted below :)
>
> On 7/1/06, ara.t.howard / noaa.gov <ara.t.howard / noaa.gov> wrote:
> >
> >    fortytwo :~ > cat a.rb
> >    require 'rbconfig'
> >    require 'tempfile'
> >
> >    def console command
> >      arch = Config::CONFIG['arch']
> >
> >      unless arch =~ %r/win/i
> >        tmp = Tempfile.new Process.pid.to_s
> >        tmp << command
> >        tmp << "\n"
> >        tmp << "bash"
> >        tmp << "\n"
> >        tmp.close
> >        begin
> >          system "xterm -e 'bash -l -i #{ tmp.path }'"
> >        ensure
> >          tmp.close!
> >        end
> >      else
>           system "start cmd /k #{command}"
> >      end
> >    end
> >
> >    console 'date'
> >
>
> Regards,
> Sean
>
>


-- 
* J *
  ~