Merge pull request #2118 from payonel/openloader-installer

make openloader installer compatable with openos install tool
This commit is contained in:
payonel 2016-11-02 21:42:45 -07:00 committed by GitHub
commit 1d5c69924f
2 changed files with 16 additions and 15 deletions

View File

@ -0,0 +1 @@
os.execute(install.from .. "/bin/opl-flash.lua")

View File

@ -153,7 +153,7 @@ end
local say = not (options.q or options.quiet) and print or function()end local say = not (options.q or options.quiet) and print or function()end
say ("Do you really want to flash openloader to EEPROM("..tostring(#eeprom).." bytes)[Y/n]") say ("Do you really want to flash openloader to EEPROM("..tostring(#eeprom).." bytes)[Y/n]")
if options.q or options.quiet or io.read():lower() == "y" then if options.q or options.quiet or ((io.read() or "n").."y"):match("^%s*[Yy]") then
say("Flashing... Do not reboot now!") say("Flashing... Do not reboot now!")
component.eeprom.set(eeprom) component.eeprom.set(eeprom)
component.eeprom.setLabel((type(options.label) == "string" and options.label) or version) component.eeprom.setLabel((type(options.label) == "string" and options.label) or version)