<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/rad/darwin_installer.rb</filename>
    </added>
    <added>
      <filename>lib/rad/linux_installer.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -14,6 +14,8 @@ require 'readline'
 
 require File.expand_path(File.dirname(__FILE__)) + &quot;/../lib/rad/version.rb&quot;
 require File.expand_path(File.dirname(__FILE__)) + &quot;/../lib/rad/progressbar.rb&quot;
+require File.expand_path(File.dirname(__FILE__)) + &quot;/../lib/rad/linux_installer.rb&quot;
+require File.expand_path(File.dirname(__FILE__)) + &quot;/../lib/rad/darwin_installer.rb&quot;
 
 class OptionParser #:nodoc:
     
@@ -94,26 +96,16 @@ end
 
 
 if ARGV[0] == &quot;install&quot;
-  raise &quot;Sorry. Can only install Arduino on Mac OS X. See here for Linux instructions: http://www.arduino.cc/playground/Learning/Linux&quot; unless RUBY_PLATFORM =~ /darwin/
-  puts &quot;Downloading arduino-0012 for Mac from Arduino.cc&quot;
-  File.open(&quot;/Applications/arduino-0012.zip&quot;, &quot;w&quot;) do |file|
-    pbar = nil
-    file &lt;&lt; open(&quot;http://www.arduino.cc/files/arduino-0012-mac.zip&quot;,
-    :content_length_proc =&gt; lambda {|t|
-      if t &amp;&amp; 0 &lt; t
-        pbar = ProgressBar.new(&quot; Progress&quot;, t)
-        pbar.file_transfer_mode
-      end
-    },
-    :progress_proc =&gt; lambda {|s|
-      pbar.set s if pbar
-    }).read
-    pbar.finish
+  
+  case RUBY_PLATFORM
+  when /linux/
+    LinuxInstaller.install!
+  when /darwin/
+    DarwinInstaller.install!
+  else
+    raise &quot;Sorry. Can only install Arduino on Mac OS X. See here for Linux instructions: http://www.arduino.cc/playground/Learning/Linux&quot;
   end
-  puts &quot;Unzipping...&quot;
-  `cd /Applications; unzip arduino-0012.zip`
-  `rm /Applications/arduino-0012.zip`
-  puts &quot;installed Arduino here: /Applications/arduino-0012&quot;
+
 elsif ARGV[0] == &quot;test&quot;
   test_dir = File.expand_path(File.dirname(__FILE__)) + &quot;/../test/hello_world_test&quot;
   puts &quot;Compiling hello_world.cpp to test your Arduino.&quot;</diff>
      <filename>bin/rad</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3bb0bce87233f491cc6fab4e143194fb7eb46b77</id>
    </parent>
  </parents>
  <author>
    <name>Greg Borenstein</name>
    <email>greg@mfdz.com</email>
  </author>
  <url>http://github.com/atduskgreg/rad/commit/bf194815002ffd83fe9a7cc064bf00e0d750753f</url>
  <id>bf194815002ffd83fe9a7cc064bf00e0d750753f</id>
  <committed-date>2008-12-10T20:38:29-08:00</committed-date>
  <authored-date>2008-12-10T20:38:29-08:00</authored-date>
  <message>added linux install code from Colin Harris. also, refactored darwin install script into a class parallel to the linux one</message>
  <tree>3013ccf4ded6d84b87182412289d9a2912efa24d</tree>
  <committer>
    <name>Greg Borenstein</name>
    <email>greg@mfdz.com</email>
  </committer>
</commit>
