From fe08446d84e0aa939780ad013f0545778703da6d Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 19 Jul 2019 14:10:39 -0400 Subject: MBS as default shell --- startup.lua | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'startup.lua') diff --git a/startup.lua b/startup.lua index 424850e..8456680 100644 --- a/startup.lua +++ b/startup.lua @@ -34,7 +34,7 @@ function bootloader() term.setCursorPos(1,6) print("3. Recovery Mode\n") term.setCursorPos(1,7) - print("4. Boot CraftOS\n") + print("4. Boot CraftOS with MBS\n") term.setCursorPos(1,9) term.write("> ") end @@ -84,8 +84,10 @@ function bootloaderInput() shell.run("/system/recovery/main.lua") elseif input == "4" then clear() + sleep(1) + assert(loadfile("/.mbs/bin/mbs.lua", _ENV))('startup') term.setTextColor(16) - print(os.version()) + print(os.version() .. " (+MBS)") term.setCursorPos(1,2) term.setTextColor(1) else @@ -99,22 +101,12 @@ function bootloaderInput() end clear() print("Welcome to BUBL!") -if fs.exists(bublcfg) then - sleep(1) - if fs.exists("/.git") then - devMode = true - else - devMode = false - end - clear() - bootloader() - bootloaderInput() +sleep(1) +if fs.exists("/.git") then + devMode = true else - clear() - term.setTextColor(colors.red) - print("[ERROR] System cannot find bubl.cfg...") - term.setCursorPos(1,2) - print("System halted...") - sleep(2) - os.shutdown() + devMode = false end +clear() +bootloader() +bootloaderInput() \ No newline at end of file -- cgit v1.2.3