improved install script.

This commit is contained in:
Andrew Lalis 2022-12-17 16:35:11 +01:00
parent 625f671821
commit 2b8874ba63
3 changed files with 18 additions and 1 deletions

View File

@ -7,4 +7,17 @@ to run the installer on your device.
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()

View File

@ -5,6 +5,8 @@ Author: Andrew Lalis <andrewlalisofficial@gmail.com>
]]--
VERSION = "0.0.1"
local t = turtle
-- The itemscript module. Functions defined within this table are exported.

View File

@ -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.
]]--
VERSION = "0.0.1"
local t = turtle
-- The movescript module. Functions defined within this table are exported.