1
Fork 0

basic scripts for executing remote scripts in computercraft

This commit is contained in:
Joshua Moerman 2012-04-27 14:32:48 +02:00
parent def73419fc
commit 4d7132d681
3 changed files with 11 additions and 1 deletions

6
download.lua Normal file
View file

@ -0,0 +1,6 @@
local tArgs = { ... }
local url = "http://example.net/computercraft/"
local x = http.get(url..tArgs[1]).readAll()
hFile = io.open(tArgs[2], "w")
hFile:write(x)
hFile:close()

5
execute.lua Normal file
View file

@ -0,0 +1,5 @@
local tArgs = { ... }
local url = "http://example.net/computercraft/"
local x = http.get(url..tArgs[1]).readAll()
f = loadstring(x)
f(unpack(tArgs, 2))

View file

@ -1 +0,0 @@
print("Hello world!")