Skip to content

Instantly share code, notes, and snippets.

@shadeslayer
Created August 22, 2015 01:12
Show Gist options
  • Save shadeslayer/2cc61ccc035e181f7839 to your computer and use it in GitHub Desktop.
Save shadeslayer/2cc61ccc035e181f7839 to your computer and use it in GitHub Desktop.
require_relative 'imageconfig'
require_relative 'lib/firmware/backend'
require 'open-uri'
require 'fileutils'
require 'digest'
# Class to handle firmware installation
class Firmware
def initialize(config)
@c = config
# Source the right backend
require_relative "lib/firmware/#{@c.config[:firmware][:backend]}"
end
def install(target)
return unless @c.config[:firmware]
f = FimrwareInstaller.new(@c)
f.install(target)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment