diff --git a/Src/Hyperion-bash/bin/cat b/Src/Hyperion-bash/bin/cat deleted file mode 100644 index 1156880..0000000 --- a/Src/Hyperion-bash/bin/cat +++ /dev/null @@ -1,33 +0,0 @@ -local args = {...} -local name = syscall.getTask(syscall.getpid()).name -local fs = require("sys.fs") - -if not args[1] then - while true do - local content = syscall.read(0, 1024) - if not content or content == "" then break end - printInline(content) - end - print("") - return -end - -for _, arg in ipairs(args) do - local filePath = arg - if filePath:sub(1,1) ~= "/" then - filePath = syscall.getcwd().."/"..filePath - end - - if not fs.exists(filePath) then - print(name..": Cannot access '"..arg.."': No such file.") - else - local fd = syscall.open(filePath, "r") - while true do - local content = syscall.read(fd, 1024) - if not content or content == "" then break end - printInline(content) - end - syscall.close(fd) - end -end -print("") diff --git a/Src/Hyperion-bash/bin/clear b/Src/Hyperion-bash/bin/clear deleted file mode 100644 index 8519315..0000000 --- a/Src/Hyperion-bash/bin/clear +++ /dev/null @@ -1 +0,0 @@ -syscall.devctl(1,"clear") \ No newline at end of file diff --git a/Src/Hyperion-bash/bin/echo b/Src/Hyperion-bash/bin/echo deleted file mode 100644 index 7b5a803..0000000 --- a/Src/Hyperion-bash/bin/echo +++ /dev/null @@ -1,2 +0,0 @@ -local args = {...} -print(table.concat(args, " ")) \ No newline at end of file diff --git a/Src/Hyperion-bash/bin/hyshex b/Src/Hyperion-bash/bin/hyshex deleted file mode 100644 index b69309a..0000000 --- a/Src/Hyperion-bash/bin/hyshex +++ /dev/null @@ -1,94 +0,0 @@ ---:Minify:-- -syscall.open("/dev/tty/tty1","r") -syscall.open("/dev/tty/tty1","w") -syscall.open("/dev/null","r") -syscall.devctl(1,"clear") -syscall.devctl(1,"sfgc",1) -syscall.devctl(1,"spos",1,1) -print("HyperionOS hysh Shell") -local str="" -local stopInput=false -local proc=0 -local fs=require("sys.fs") -local timeout=false -syscall.setEnviron("SHELL","simpleshell") -printInline("> ") -syscall.sigcatch(function(sig) - if sig==1 then - syscall.kill(proc) - print("Terminated") - printInline("> ") - stopInput=false - end -end) - -while true do - if not stopInput then - local input=syscall.read(0) - if input then - if input=="\b" then - if #str>0 then - str=str:sub(1,#str-1) - printInline("\b") - end - elseif input=="\n" then - print("") - stopInput=true - if str == "" then - printInline("> ") - stopInput=false - else - local path=nil - local split=string.split(str, " ") - if fs.exists("/bin/"..split[1]) then - path="/bin/"..split[1] - elseif fs.exists("/bin/"..split[1]..".lua") then - path="/bin/"..split[1]..".lua" - end - if not path then - print("Program not found") - printInline("> ") - stopInput=false - else - local text = fs.readAllText(path) - local program, err = load(text, path) - if not program then - print(err) - printInline("> ") - end - proc = syscall.spawn(function(...) - syscall.open("/dev/tty/tty1","r") - syscall.open("/dev/tty/tty1","w") - syscall.open("/dev/null","w") - program(...) - end, path, nil, {table.unpack(split, 2)}) - end - str="" - end - else - str=str..input - printInline(input) - end - timeout=false - else - timeout=true - end - else - local exited, code = syscall.collect(proc) - if exited then - if code then - print("\nTask exited with code:\n"..tostring(code)) - end - printInline("> ") - stopInput=false - end - timeout=true - end - if timeout then - if stopInput then - sleep(.5) - else - sleep(.05) - end - end -end diff --git a/Src/Hyperion-bash/bin/luaold b/Src/Hyperion-bash/bin/luaold deleted file mode 100644 index 6226c17..0000000 --- a/Src/Hyperion-bash/bin/luaold +++ /dev/null @@ -1,50 +0,0 @@ ---:Minify:-- -print("HyperionOS lua") -local str="" -local stopInput=false -local timeout=false -local luaEnv=setmetatable({},{__index=_ENV}) -printInline("> ") -while true do - local input=syscall.read(0) - if input then - if input=="\b" then - if #str>0 then - str=str:sub(1,#str-1) - printInline("\b") - end - elseif input=="\n" then - print("") - stopInput=true - if str == "" then - printInline("> ") - stopInput=false - elseif str == "exit()" then - break - else - local func=load(str,"@Lua","t",luaEnv) - local ok,err = xpcall(func, debug.traceback) - if not ok then - print(err) - end - printInline("\n> ") - str="" - end - str="" - else - str=str..input - printInline(input) - end - timeout=false - else - timeout=true - end - - if timeout then - if stopInput then - sleep(.5) - else - sleep(.05) - end - end -end \ No newline at end of file diff --git a/Src/Hyperion-bash/bin/mkdir b/Src/Hyperion-bash/bin/mkdir deleted file mode 100644 index 025a830..0000000 --- a/Src/Hyperion-bash/bin/mkdir +++ /dev/null @@ -1,23 +0,0 @@ -local args = {...} -local name = syscall.getTask(syscall.getpid()).name -if #args == 0 then - print(name..": Missing operand.") - return -end - -local fs = require("sys.fs") -local newDir = args[1] -if newDir:sub(1, 1) ~= "/" then - newDir = syscall.getcwd().."/"..newDir -end - -if newDir:sub(#newDir, #newDir) ~= "/" then - newDir = newDir.."/" -end - -if fs.isDir(newDir) then - print(name..": Cannot create directory '"..args[1].."': Directory already exists.") - return -end - -fs.mkdir(newDir) \ No newline at end of file diff --git a/Src/Hyperion-bash/bin/ps b/Src/Hyperion-bash/bin/ps index 97a99ea..4004fc1 100644 --- a/Src/Hyperion-bash/bin/ps +++ b/Src/Hyperion-bash/bin/ps @@ -1,3 +1,4 @@ +--:Minify:-- for i,v in ipairs(syscall.getTasks()) do local task = syscall.getTask(v) print(task.pid,task.username,task.name,task.status) diff --git a/Src/Hyperion-bash/bin/pwd b/Src/Hyperion-bash/bin/pwd deleted file mode 100644 index f583060..0000000 --- a/Src/Hyperion-bash/bin/pwd +++ /dev/null @@ -1 +0,0 @@ -print(syscall.getcwd()) \ No newline at end of file diff --git a/Src/Hyperion-bash/bin/sysdump b/Src/Hyperion-bash/bin/sysdump index e532fbc..224d47f 100644 --- a/Src/Hyperion-bash/bin/sysdump +++ b/Src/Hyperion-bash/bin/sysdump @@ -1,3 +1,4 @@ +--:Minify:-- local syscalls=syscall.sysdump() for i=1, #syscalls do print(syscalls[i]) diff --git a/Src/Hyperion-bash/bin/whoami b/Src/Hyperion-bash/bin/whoami deleted file mode 100644 index 3d832ca..0000000 --- a/Src/Hyperion-bash/bin/whoami +++ /dev/null @@ -1 +0,0 @@ -print((syscall.getUsername() or "Unknown")) \ No newline at end of file diff --git a/Src/Hyperion-bash/bin/yes b/Src/Hyperion-bash/bin/yes index 9490c89..bf0d571 100644 --- a/Src/Hyperion-bash/bin/yes +++ b/Src/Hyperion-bash/bin/yes @@ -1,3 +1,4 @@ +--:Minify:-- local args = {...} while true do if #args == 0 then diff --git a/Src/Hyperion-installer/bin/install b/Src/Hyperion-installer/@CD/install similarity index 100% rename from Src/Hyperion-installer/bin/install rename to Src/Hyperion-installer/@CD/install