aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-11-16 15:25:12 -0500
committerAndrew Lee <alee14498@protonmail.com>2020-11-16 15:25:12 -0500
commit59acb51a3297917dd8eebc84ea85abd91e7803df (patch)
tree974eef8030e1bc1e49017a38c7ffa31b00f5f47a
parentfb04d5143b20194f98955bd2d151cc80ef00c1a9 (diff)
downloadbits-UI-59acb51a3297917dd8eebc84ea85abd91e7803df.tar.gz
bits-UI-59acb51a3297917dd8eebc84ea85abd91e7803df.tar.bz2
bits-UI-59acb51a3297917dd8eebc84ea85abd91e7803df.zip
Some fixes with files; Reduced sleep on boot
-rw-r--r--System/boot.lua23
-rw-r--r--System/desktop.lua2
-rw-r--r--System/post-setup.lua26
-rw-r--r--System/recovery/main.lua4
-rw-r--r--System/recovery/reset.lua2
-rw-r--r--System/recovery/transfer.lua2
-rw-r--r--boot/ccboot/ccboot.cfg6
7 files changed, 28 insertions, 37 deletions
diff --git a/System/boot.lua b/System/boot.lua
index 4b3227f..35d212b 100644
--- a/System/boot.lua
+++ b/System/boot.lua
@@ -14,28 +14,25 @@
]]--
local version = "1.0 Alpha 2"
-local desktop = "/system/desktop.lua"
+local desktop = "/System/desktop.lua"
term.clear()
term.setCursorPos(1,1)
print("Starting up bits-UI ".. version .."...")
-sleep(1)
print(_HOST)
-sleep(1)
if term.isColor() then
term.setTextColor(colors.green)
print("[OK] Advanced Computer is detected...")
else
print("[ERROR] You need a advanced computer in order to make the UI functional...")
- sleep(3)
+ sleep(2)
os.shutdown()
end
-sleep(1)
if fs.exists(desktop) then
term.setTextColor(colors.green)
@@ -47,9 +44,7 @@ else
os.shutdown()
end
-sleep(1)
-
-if fs.exists("/home") then
+if fs.exists("/Home") then
term.setTextColor(colors.green)
print("[OK] Home has been found...")
else
@@ -67,24 +62,20 @@ else
print("[OK] Etc directory has been created...")
end
-sleep(1)
-
-if fs.exists("/home/.config") then
+if fs.exists("/Home/.config") then
term.setTextColor(colors.green)
print("[OK] Config has been found...")
else
- config = io.open("/home/.config", "w")
+ config = io.open("/Home/.config", "w")
config:close()
term.setTextColor(colors.blue)
print("[INFO] Config has not been found!")
print("[INFO] You will be sent to the post installation setup...")
sleep(2)
- shell.run("/system/post-setup.lua")
+ shell.run("/System/post-setup.lua")
end
-
-sleep(1)
term.setTextColor(colors.green)
print("[DONE] Boot sequence has been completed...")
term.setTextColor(colors.white)
-sleep(1)
+sleep(3)
shell.run(desktop) \ No newline at end of file
diff --git a/System/desktop.lua b/System/desktop.lua
index fe6cbb6..27b7e07 100644
--- a/System/desktop.lua
+++ b/System/desktop.lua
@@ -13,7 +13,7 @@
GNU General Public License for more details.
]]--
-os.loadAPI("/system/apis/flib.lua")
+os.loadAPI("/System/apis/flib.lua")
local backgroundColour = 32768
local backgroundImage = "/home/.background"
local panelColour = 8192
diff --git a/System/post-setup.lua b/System/post-setup.lua
index 18f289f..94c9d65 100644
--- a/System/post-setup.lua
+++ b/System/post-setup.lua
@@ -12,9 +12,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
]]--
-os.loadAPI("/system/apis/sha256.lua")
-os.loadAPI("/system/apis/json.lua")
-local config = "/home/.config"
+os.loadAPI("/System/apis/sha256.lua")
+os.loadAPI("/System/apis/json.lua")
+local config = "/Home/.config"
term.clear()
term.setCursorPos(1,1)
@@ -22,7 +22,7 @@ term.setTextColor(colors.white)
print("Welcome to the bits-UI Post Setup!")
sleep(2)
-print("Please enter your password.")
+--[[print("Please enter your password.")
--print("(Don't set your real password in servers.)")
local passPath = "/etc/passwd.pwd"
@@ -40,25 +40,25 @@ end
sleep(3)
term.clear()
term.setCursorPos(1,1)
-term.setTextColor(colors.white)
+term.setTextColor(colors.white)]]--
print("Copying files to local user.")
-fs.makeDir("/home/Documents")
-fs.makeDir("/home/Downloads")
-fs.makeDir("/home/Pictures")
+fs.makeDir("/Home/Documents")
+fs.makeDir("/Home/Downloads")
+fs.makeDir("/Home/Pictures")
-if fs.exists("/system/skel/README.txt") then
- shell.run("copy", "/system/skel/README.txt", "/home/Documents")
+if fs.exists("/System/skel/README.txt") then
+ shell.run("copy", "/System/skel/README.txt", "/Home/Documents")
else
print("[ERROR] Unable to find README.txt...")
end
-if fs.exists("/system/skel/.background") then
- shell.run("copy", "/system/skel/.background", "/home")
+if fs.exists("/System/skel/.background") then
+ shell.run("copy", "/System/skel/.background", "/Home")
else
print("[ERROR] Unable to find the background...")
end
sleep(1)
print("Finished copying files.")
sleep(2)
-shell.run("/system/desktop.lua") \ No newline at end of file
+shell.run("/System/desktop.lua") \ No newline at end of file
diff --git a/System/recovery/main.lua b/System/recovery/main.lua
index 10fbe18..15c51aa 100644
--- a/System/recovery/main.lua
+++ b/System/recovery/main.lua
@@ -21,9 +21,9 @@ sleep(2)
print("Do you want to either reset or transfer?")
local input = read();
if input == "reset" then
- shell.run("/system/recovery/reset.lua")
+ shell.run("/System/recovery/reset.lua")
elseif input == "transfer" then
- shell.run("/system/recovery/transfer.lua")
+ shell.run("/System/recovery/transfer.lua")
else
os.reboot()
end \ No newline at end of file
diff --git a/System/recovery/reset.lua b/System/recovery/reset.lua
index a8c8cf1..c96a304 100644
--- a/System/recovery/reset.lua
+++ b/System/recovery/reset.lua
@@ -23,7 +23,7 @@ print("Are you sure you want to reset bits-UI? (y/n)")
local input = read()
if input == "y" then
print("Erasing all user stored data...")
- fs.delete("/home")
+ fs.delete("/Home")
fs.delete("/etc/passwd.pwd")
sleep(2)
print("Erased all data...")
diff --git a/System/recovery/transfer.lua b/System/recovery/transfer.lua
index b1b98f1..996d4b0 100644
--- a/System/recovery/transfer.lua
+++ b/System/recovery/transfer.lua
@@ -19,7 +19,7 @@ term.setTextColor(colors.white)
print("Welcome to the bits-UI transfer!")
sleep(2)
if fs.exists("/disk") then
- shell.run("copy", "/home", "/disk")
+ shell.run("copy", "/Home", "/disk")
shell.run("copy", "/etc/passwd.pwd", "/disk")
else
print("You need a floppy disk to copy over data.")
diff --git a/boot/ccboot/ccboot.cfg b/boot/ccboot/ccboot.cfg
index f9cff2f..f077b8f 100644
--- a/boot/ccboot/ccboot.cfg
+++ b/boot/ccboot/ccboot.cfg
@@ -1,9 +1,9 @@
selected 1
timeout 5
-entry bits-UI;system/boot.lua
-entry bits-UI Update;system/update.lua
-entry bits-UI Recovery;system/recovery/main.lua
+entry bits-UI;System/boot.lua
+entry bits-UI Update;System/update.lua
+entry bits-UI Recovery;System/recovery/main.lua
entry CraftOS Regular;rom/programs/shell.lua
entry CraftOS (MBS);boot/mbs.lua
entry Shutdown;shutdown \ No newline at end of file