spaces->tab, equipper improvements, supertreefarm rewrite, follow improvements, sensor cleanup, milo multiple items allowed in recipes, remote canvas access

This commit is contained in:
kepler155c@gmail.com
2019-06-18 15:23:20 -04:00
parent 3b9b509429
commit 045b32884f
162 changed files with 20448 additions and 20286 deletions

View File

@@ -3,8 +3,8 @@ local shell = require("shellex.shell")
local args = shell.parse(...)
if #args == 0 then
io.write("Usage: ln <target> [<name>]\n")
return 1
io.write("Usage: ln <target> [<name>]\n")
return 1
end
local target_name = args[1]
@@ -12,23 +12,23 @@ local target = shell.resolve(target_name)
-- don't link from target if it doesn't exist, unless it is a broken link
if not fs.exists(target) and not fs.isLink(target) then
io.stderr:write("ln: failed to access '" .. target_name .. "': No such file or directory\n")
return 1
io.stderr:write("ln: failed to access '" .. target_name .. "': No such file or directory\n")
return 1
end
local linkpath
if #args > 1 then
linkpath = shell.resolve(args[2])
linkpath = shell.resolve(args[2])
else
linkpath = fs.concat(shell.getWorkingDirectory(), fs.name(target))
linkpath = fs.concat(shell.getWorkingDirectory(), fs.name(target))
end
if fs.isDirectory(linkpath) then
linkpath = fs.concat(linkpath, fs.name(target))
linkpath = fs.concat(linkpath, fs.name(target))
end
local result, reason = fs.link(target, linkpath)
if not result then
io.stderr:write(reason..'\n')
return 1
io.stderr:write(reason..'\n')
return 1
end