mirror of
https://github.com/Kiritow/OpenComputerScripts.git
synced 2024-03-22 13:10:46 +08:00
23 lines
466 B
Lua
23 lines
466 B
Lua
-- bundle: command line tool for bundling files
|
|
|
|
local component=require("component")
|
|
local shell=require("shell")
|
|
require("libbundle")
|
|
|
|
local args,opts=shell.parse(...)
|
|
local argc=#args
|
|
|
|
if(argc<1 or (opts.d==nil and argc<2)) then
|
|
print("Usage: bundle [-d] <bundled file> [<input file>, ...]")
|
|
return
|
|
end
|
|
|
|
if(opts.d~=nil) then
|
|
Unbundle(args[1])
|
|
else
|
|
local t={}
|
|
for i=2,argc,1 do
|
|
table.insert(t,args[i])
|
|
end
|
|
Bundle(t,args[1])
|
|
end |