mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-21 03:29:22 +01:00
35 lines
1.1 KiB
Lua
35 lines
1.1 KiB
Lua
local archive = require("lib/archive")
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------
|
|
|
|
local args = {...}
|
|
|
|
archive.debugMode = true
|
|
|
|
if args[1] == "pack" then
|
|
if not args[2] or not args[3] then
|
|
print(" ")
|
|
print("Использование: archive pack <имя архива> <архивируемая папка>")
|
|
print(" ")
|
|
return
|
|
end
|
|
archive.pack(args[2], args[3])
|
|
elseif args[1] == "unpack" then
|
|
if not args[2] or not args[3] then
|
|
print(" ")
|
|
print("Использование: archive unpack <путь к архиву> <папка для сохранения файлов>")
|
|
print(" ")
|
|
return
|
|
end
|
|
archive.unpack(args[2], args[3])
|
|
else
|
|
print(" ")
|
|
print("Использование: archive <pack/unpack> <имя архива/путь к архиву> <архивируемая папка/папка для сохранения файлов>")
|
|
print(" ")
|
|
return
|
|
end
|
|
|
|
archive.debugMode = false
|
|
|
|
------------------------------------------------------------------------------------------------------------------------------------
|