mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-26 03:48:06 +11:00
Compare commits
No commits in common. "6cbe2d6479494d38a321fea33ee8afd2a73397f5" and "8298c211244190c764e1be1fbbfc534d7153e005" have entirely different histories.
6cbe2d6479
...
8298c21124
@ -1,36 +0,0 @@
|
|||||||
c=""
|
|
||||||
do
|
|
||||||
local host,port,FD=component.invoke(component.list("eeprom")(),"getData"):match("(.+)\n(.+)\n(.+)")
|
|
||||||
port=tonumber(port)
|
|
||||||
local fs,dirlist,filelist=component.proxy(computer.tmpAddress()),{FD},{}
|
|
||||||
for _,dir in pairs(dirlist) do
|
|
||||||
local content,ftype = fget(host,dir,port)
|
|
||||||
if ftype == "d" then
|
|
||||||
for line in content:gmatch("[^\n]+") do
|
|
||||||
if line:sub(-1) == "/" then
|
|
||||||
dirlist[#dirlist+1] = dir..line
|
|
||||||
else
|
|
||||||
filelist[#filelist+1] = dir..line
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
for _,dir in pairs(dirlist) do
|
|
||||||
dir=dir:sub(#dirlist[1])
|
|
||||||
fs.makeDirectory(dir)
|
|
||||||
end
|
|
||||||
for _,file in pairs(filelist) do
|
|
||||||
local filename=file:sub(#dirlist[1]+1)
|
|
||||||
local content,ftype = fget(host,file,port)
|
|
||||||
f=fs.open(filename,"wb")
|
|
||||||
fs.write(f,content)
|
|
||||||
fs.close(f)
|
|
||||||
end
|
|
||||||
local fh,b = fs.open("boot.lua"),""
|
|
||||||
repeat
|
|
||||||
b=fs.read(fh,4096) or ""
|
|
||||||
c=c..b
|
|
||||||
until b == ""
|
|
||||||
end
|
|
||||||
computer.getBootAddress = computer.tmpAddress
|
|
||||||
load(c)()
|
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
{"init","I"},
|
|
||||||
{"dirlist","DL"},
|
|
||||||
{"filelist","FL"},
|
|
||||||
{"host","H"},
|
|
||||||
{"port","P"},
|
|
||||||
{"line","L"},
|
|
||||||
{"ftype","F"},
|
|
||||||
{"content","K"},
|
|
||||||
{"filename","FN"},
|
|
||||||
{"table.remove","TR"},
|
|
||||||
{"dir","CD"},
|
|
||||||
{"file","CF"}
|
|
||||||
,}
|
|
@ -2,9 +2,9 @@ function fget(A,P,V)
|
|||||||
local b,tb,s="","",net.open(A,V or 70)
|
local b,tb,s="","",net.open(A,V or 70)
|
||||||
s:w("t"..P.."\n")
|
s:w("t"..P.."\n")
|
||||||
repeat
|
repeat
|
||||||
computer.pullSignal()
|
UC.pullSignal()
|
||||||
tb=s:r(2048)
|
tb=s:r(2048)
|
||||||
b=b..tb
|
b=b..tb
|
||||||
until tb == "" and s.s == "c"
|
until tb == "" and s.s == "c"
|
||||||
return b:sub(2),b:sub(1,1)
|
return b:sub(2)
|
||||||
end
|
end
|
||||||
|
@ -9,8 +9,6 @@ echo ufs.lua
|
|||||||
lua minify.lua ufs.lua mini-ufs.lua
|
lua minify.lua ufs.lua mini-ufs.lua
|
||||||
echo init-wrapper.lua
|
echo init-wrapper.lua
|
||||||
lua minify.lua init-wrapper.lua mini-init-wrapper.lua
|
lua minify.lua init-wrapper.lua mini-init-wrapper.lua
|
||||||
echo dlfs.lua
|
|
||||||
lua minify.lua dlfs.lua mini-dlfs.lua
|
|
||||||
echo microtel-3.lua
|
echo microtel-3.lua
|
||||||
lua minify.lua microtel/microtel-3.lua microtel/mini-microtel-3.lua
|
lua minify.lua microtel/microtel-3.lua microtel/mini-microtel-3.lua
|
||||||
echo microtel-4.lua
|
echo microtel-4.lua
|
||||||
@ -29,6 +27,3 @@ cat microtel/mini-microtel-{3,4,5-core,5-open}.lua mini-vt100.lua mini-minipromp
|
|||||||
lua minify.lua nminiprompt.lua mini-nminiprompt.lua
|
lua minify.lua nminiprompt.lua mini-nminiprompt.lua
|
||||||
echo -e "GC,UC=component,computer" | cat - mini-nminiprompt.lua > mini-fnminiprompt.lua
|
echo -e "GC,UC=component,computer" | cat - mini-nminiprompt.lua > mini-fnminiprompt.lua
|
||||||
mv mini-fnminiprompt.lua mini-nminiprompt.lua
|
mv mini-fnminiprompt.lua mini-nminiprompt.lua
|
||||||
|
|
||||||
cat microtel/mini-microtel-{3,4,5-core,5-open}.lua mini-fget.lua mini-dlfs.lua > mini-nbcore.lua
|
|
||||||
cat microtel/microtel-{3,4,5-core,5-open}.lua fget.lua dlfs.lua > nbcore.lua
|
|
||||||
|
@ -2,7 +2,6 @@ local net = require "minitel"
|
|||||||
local syslog = require "syslog"
|
local syslog = require "syslog"
|
||||||
local fs = require "filesystem"
|
local fs = require "filesystem"
|
||||||
local event = require "event"
|
local event = require "event"
|
||||||
local serial = require "serialization"
|
|
||||||
|
|
||||||
local coro = {} -- table of coroutines, one per socket
|
local coro = {} -- table of coroutines, one per socket
|
||||||
local cfg = {}
|
local cfg = {}
|
||||||
|
@ -74,7 +74,6 @@ if firstrun then -- if first run, quit now
|
|||||||
cfg.route = false
|
cfg.route = false
|
||||||
end
|
end
|
||||||
os.execute("rc minitel enable")
|
os.execute("rc minitel enable")
|
||||||
os.execute("rc minitel start")
|
|
||||||
writecfg()
|
writecfg()
|
||||||
print("Your hostname is "..hostname..".")
|
print("Your hostname is "..hostname..".")
|
||||||
print("Run mtcfg to configure advanced settings.")
|
print("Run mtcfg to configure advanced settings.")
|
||||||
|
Loading…
Reference in New Issue
Block a user