v0.8.0 - Added help and fetch.
This commit is contained in:
+5
-6
@@ -11,15 +11,14 @@ if toFile:sub(1, 1) ~= "/" then
|
||||
end
|
||||
if fromFile == toFile then
|
||||
print("\27[91mSource and destination are the same.")
|
||||
return
|
||||
end
|
||||
if not fs.exists(fromFile) then
|
||||
print("\27[91mSource file does not exist.")
|
||||
return
|
||||
end
|
||||
if fs.exists(toFile) then
|
||||
print("Destination file already exists. Overwrite it? [Y/n] ", false)
|
||||
if read():lower() == "n" then
|
||||
print("Aborted.")
|
||||
return
|
||||
end
|
||||
if fs.exists(toFile) and not (table.find(args, "-o") or table.find(args, "--overwrite")) then
|
||||
print("\27[91mDestination file already exists. Run this command again with -o to overwrite it.")
|
||||
return
|
||||
end
|
||||
fs.copy(fromFile, toFile)
|
||||
|
||||
Reference in New Issue
Block a user