ported apps lscor, mv, and rm

there's partially rtest too, if you count that
This commit is contained in:
Ponali
2025-09-15 07:08:19 +02:00
parent ff04e730f9
commit 66783e455c
4 changed files with 7 additions and 5 deletions
+3 -2
View File
@@ -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.")