add -p option for local package path
This commit is contained in:
parent
58b39788f3
commit
7ab55ce0a5
@ -12,6 +12,14 @@ while ptr>0 do
|
||||
else
|
||||
error("--install-dir needs an argument")
|
||||
end
|
||||
elseif c=="-p" or c=="--package-dir" then
|
||||
if args[ptr+1] then
|
||||
flags.package_dir=args[ptr+1]
|
||||
table.remove(args,ptr+1)
|
||||
table.remove(args,ptr)
|
||||
else
|
||||
error("--package-dir needs an argument")
|
||||
end
|
||||
end
|
||||
ptr=ptr-1
|
||||
end
|
||||
@ -19,6 +27,10 @@ if flags.install_dir then
|
||||
local s,r=pkg.set_install_dir(flags.install_dir)
|
||||
if not s then error(r) end
|
||||
end
|
||||
if flags.package_dir then
|
||||
pkg.set_local(true)
|
||||
pkg.set_pkg_url(flags.package_dir)
|
||||
end
|
||||
if args[1]=="i" and args[2]~=nil then
|
||||
local deps=pkg.dependencies(args[2])
|
||||
local rstrt={false}
|
||||
|
Loading…
x
Reference in New Issue
Block a user