From fc5532b16318599cb7acce820132f0c99ed68cc3 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 14 Jul 2019 20:37:47 -0400 Subject: New things! --- startup.lua | 13 +++++++++---- system/post-setup.lua | 14 ++++++++++---- system/transfer.lua | 7 +++++++ 3 files changed, 26 insertions(+), 8 deletions(-) create mode 100644 system/transfer.lua diff --git a/startup.lua b/startup.lua index f09d191..e317bc1 100644 --- a/startup.lua +++ b/startup.lua @@ -15,13 +15,18 @@ ]]-- local boot = "/system/boot.lua" local bublcfg = "/boot/bubl.cfg" -local allowUpdate = true +local bVersion = "0.2" +local devMode = false function bootloader() term.setCursorPos(1,1) print("Welcome to the BUBL boot loader!\n") term.setCursorPos(1,2) - print("Version 0.2") + if fs.exists("/.git") then + print("Version ".. bVersion .. "-GIT") + else + print("Version ".. bVersion) + end term.setCursorPos(1,4) print("1. Boot bits-UI\n") term.setCursorPos(1,5) @@ -59,8 +64,8 @@ function bootloaderInput() end elseif input == "2" then clear() - if allowUpdate == false then - print("You have set updating to false!\n Please set updating to true if you want to update...") + if devMode == true then + print("You have developer mode set to true! Which means that you cannot update, you must use github to update.") sleep(3) clear() bootloader() diff --git a/system/post-setup.lua b/system/post-setup.lua index 78a80d1..1e6bfe0 100644 --- a/system/post-setup.lua +++ b/system/post-setup.lua @@ -12,9 +12,6 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ]]-- - ---local passwd = read() ---local passPath = "/etc/passwd.pwd" os.loadAPI("/system/apis/sha256.lua") term.clear() @@ -37,7 +34,16 @@ else print("[ERROR] Unable to find the background...") end ---print("Welcome to the setup! This feature will be not be in Alpha 2") +print("Welcome to the bits-UI Post Setup!") +sleep(2) +print("Please enter your password.") +print("(Don't set your real password in servers.)") +local passPath = "/etc/passwd.pwd" +local passwd = read(" ") +local insertPasswd = fs.open(passPath, "a") +insertPasswd.writeLine(passwd) +insertPasswd.close() +print("Thanks, I will save that.") sleep(1) shell.run("/system/desktop.lua") \ No newline at end of file diff --git a/system/transfer.lua b/system/transfer.lua new file mode 100644 index 0000000..d16c6b3 --- /dev/null +++ b/system/transfer.lua @@ -0,0 +1,7 @@ +term.clear() +term.setCursorPos(1,1) +term.setTextColor(colors.white) +print("Welcome to the bits-UI transfer!") +if fs.exists("/disk") then + shell.run("copy", "/home", "/disk") +end \ No newline at end of file -- cgit v1.2.3