ported apps lscor, mv, and rm
there's partially rtest too, if you count that
This commit is contained in:
@@ -4,5 +4,5 @@ for i=1, #tasks do
|
||||
local pipeChar = "├ "
|
||||
if i==#tasks then pipeChar = "└ " end
|
||||
local task = tasks[i]
|
||||
print("\27[93m"..pipeChar..i.."\27[0m - "..task.name.."\27[37m "..table.concat(task.args or {}," ").." \27[0m")
|
||||
print("\27[93m"..pipeChar..(task.id or i).."\27[0m - "..task.name.."\27[37m "..table.concat(task.args or {}," ").." \27[0m")
|
||||
end
|
||||
|
||||
+3
-2
@@ -1,4 +1,5 @@
|
||||
local fromFile, toFile = ...
|
||||
local shell = require("shell")
|
||||
local fs = require("filesystem")
|
||||
|
||||
if not fromFile or not toFile then
|
||||
@@ -6,10 +7,10 @@ if not fromFile or not toFile then
|
||||
return
|
||||
end
|
||||
if fromFile:sub(1, 1) ~= "/" then
|
||||
fromFile = fs.concat(shell.workingDirectory, fromFile)
|
||||
fromFile = fs.concat(shell.getWorkingDirectory(), fromFile)
|
||||
end
|
||||
if toFile:sub(1, 1) ~= "/" then
|
||||
toFile = fs.concat(shell.workingDirectory, toFile)
|
||||
toFile = fs.concat(shell.getWorkingDirectory(), toFile)
|
||||
end
|
||||
if fromFile == toFile then
|
||||
print("\27[91mSource and destination are the same.")
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
local file = ...
|
||||
local shell = require("shell")
|
||||
local fs = require("filesystem")
|
||||
|
||||
if not file then
|
||||
@@ -6,7 +7,7 @@ if not file then
|
||||
return
|
||||
end
|
||||
if file:sub(1, 1) ~= "/" then
|
||||
file = fs.concat(shell.workingDirectory, file)
|
||||
file = fs.concat(shell.getWorkingDirectory(), file)
|
||||
end
|
||||
if not fs.exists(file) then
|
||||
print("\27[91mFile does not exist.")
|
||||
|
||||
@@ -88,4 +88,4 @@ end
|
||||
end ]]
|
||||
|
||||
raster.free()
|
||||
termlib.cursorPosY=1
|
||||
terminal.setCursorPos(1,1)
|
||||
|
||||
Reference in New Issue
Block a user