improved install script.
This commit is contained in:
parent
625f671821
commit
2b8874ba63
15
install.lua
15
install.lua
|
@ -7,4 +7,17 @@ to run the installer on your device.
|
||||||
|
|
||||||
BASE_URL = "https://github.com/andrewlalis/movescript/blob/main"
|
BASE_URL = "https://github.com/andrewlalis/movescript/blob/main"
|
||||||
|
|
||||||
shell.run("wget " .. BASE_URL .. "/movescript.lua")
|
SCRIPTS = {
|
||||||
|
"movescript.lua",
|
||||||
|
"itemscript.lua"
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Create a local executable to re-install, instead of having to run this file via wget.
|
||||||
|
local f = io.open("install-movescript.lua", "w")
|
||||||
|
for _, script in pairs(SCRIPTS) do
|
||||||
|
url = BASE_URL .. "/" .. script
|
||||||
|
cmd = "wget " .. url .. " " .. script
|
||||||
|
shell.run(cmd)
|
||||||
|
f:write("shell.run(\"" .. cmd .. "\")")
|
||||||
|
end
|
||||||
|
f:close()
|
||||||
|
|
|
@ -5,6 +5,8 @@ Author: Andrew Lalis <andrewlalisofficial@gmail.com>
|
||||||
|
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
VERSION = "0.0.1"
|
||||||
|
|
||||||
local t = turtle
|
local t = turtle
|
||||||
|
|
||||||
-- The itemscript module. Functions defined within this table are exported.
|
-- The itemscript module. Functions defined within this table are exported.
|
||||||
|
|
|
@ -7,6 +7,8 @@ Movescript provides a simpler, conciser way to program "turtles" (robots), so
|
||||||
that you don't need to get tired of typing "turtle.forward()" over and over.
|
that you don't need to get tired of typing "turtle.forward()" over and over.
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
|
VERSION = "0.0.1"
|
||||||
|
|
||||||
local t = turtle
|
local t = turtle
|
||||||
|
|
||||||
-- The movescript module. Functions defined within this table are exported.
|
-- The movescript module. Functions defined within this table are exported.
|
||||||
|
|
Loading…
Reference in New Issue