mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-06-26 07:03:22 +00:00
![SquidDev](/assets/img/avatar_default.png)
- textures/{block,item}s -> textures/{block,item} - assets/*/{advancements,lua,recipes} -> data/*/...
25 lines
617 B
Lua
25 lines
617 B
Lua
|
|
local tArgs = { ... }
|
|
if #tArgs < 2 then
|
|
print( "Usage: mv <source> <destination>" )
|
|
return
|
|
end
|
|
|
|
local sSource = shell.resolve( tArgs[1] )
|
|
local sDest = shell.resolve( tArgs[2] )
|
|
local tFiles = fs.find( sSource )
|
|
if #tFiles > 0 then
|
|
for n,sFile in ipairs( tFiles ) do
|
|
if fs.isDir( sDest ) then
|
|
fs.move( sFile, fs.combine( sDest, fs.getName(sFile) ) )
|
|
elseif #tFiles == 1 then
|
|
fs.move( sFile, sDest )
|
|
else
|
|
printError( "Cannot overwrite file multiple times" )
|
|
return
|
|
end
|
|
end
|
|
else
|
|
printError( "No matching files" )
|
|
end
|