Sha256: f141a8fe3369d4fc1dd7a0ff3824336947407d2fe1b996d53dc770efc432f02b

Contents?: true

Size: 706 Bytes

Versions: 7

Compression:

Stored size: 706 Bytes

Contents

class DarwinInstaller
  def self.install!
    puts "Downloading arduino-0012 for Mac from Arduino.cc"
    File.open("/Applications/arduino-0012.zip", "w") do |file|
      pbar = nil
      file << open("http://www.arduino.cc/files/arduino-0012-mac.zip",
      :content_length_proc => lambda {|t|
        if t && 0 < t
          pbar = ProgressBar.new(" Progress", t)
          pbar.file_transfer_mode
        end
      },
      :progress_proc => lambda {|s|
        pbar.set s if pbar
      }).read
      pbar.finish
    end
    puts "Unzipping..."
    `cd /Applications; unzip arduino-0012.zip`
    `rm /Applications/arduino-0012.zip`
    puts "installed Arduino here: /Applications/arduino-0012"
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
neo_rad-0.4.0 lib/rad/darwin_installer.rb
madrona-rad-0.3.1.1 lib/rad/darwin_installer.rb
madrona-rad-0.3.1 lib/rad/darwin_installer.rb
madrona-rad-0.3.2 lib/rad/darwin_installer.rb
madrona-rad-0.3.3 lib/rad/darwin_installer.rb
madrona-rad-0.3.4 lib/rad/darwin_installer.rb
madrona-rad-0.3.5 lib/rad/darwin_installer.rb