okay this is stupid aaaa reverting things and adding binpath package

This commit is contained in:
v 2020-12-30 13:40:12 +00:00
parent 7623f511a0
commit 2d0beda651
7 changed files with 17 additions and 42 deletions

View File

@ -1,13 +0,0 @@
{
["version"] = "0.1.0-3",
["dependencies"] = {
},
["description"] = "Makes require look in /lib and shell look in /bin. Don't ask how. You really don't want to know.",
["files"] = {
["startup"] = {
".__add_lib_ppl.lua"
}
},
["restart_on_inst"]=1,
}

View File

@ -1,25 +0,0 @@
local function loader(mn)
local at=nil
if fs.exists("/lib/"..mn..".lua") then
at="/lib/"..mn..".lua"
elseif fs.exists(shell.dir().."/lib/"..mn..".lua") then
at=shell.dir().."/lib/"..mn..".lua"
end
if at then
local e=getfenv(1)
if e.package and #e.package.loaders==2 then
table.insert(e.package.loaders,loader)
end
return loadfile(at,nil,e)
end
return false,"\t\tno file '/lib/"..mn..".lua\n\t\tno file '"..shell.dir().."/lib/"..mn..".lua"
end
local osrun=_G.os.run
function _G.os.run(e,p,...)
if e.package and #e.package.loaders==2 then
table.insert(e.package.loaders,loader)
end
return osrun(e,p,...)
end
shell.setPath(shell.path()..":/bin")

12
binpath/pkgmeta.ltn Normal file
View File

@ -0,0 +1,12 @@
{
["version"] = "0.1.0",
["dependencies"] = {
},
["description"] = "Makes shell look in /bin.",
["files"] = {
["startup"] = {
"binpath.lua"
}
},
}

View File

@ -0,0 +1 @@
shell.setPath(shell.path()..":/bin")

View File

@ -1,5 +1,5 @@
local args={...}
local pkg=require "pkgm"
local pkg=dofile "/lib/mfs"
local flags={}
local ptr=#args
while ptr>0 do

View File

@ -1,4 +1,4 @@
local mfs=require "mfs"
local mfs=dofile "/lib/mfs"
local local_pkg_files=false
local pkg_url="https://git.osmarks.tk/heavpoot/packages1/raw/branch/master/"
local res={}

View File

@ -1,8 +1,8 @@
{
["version"] = "0.1.2-2",
["version"] = "0.1.2-3",
["dependencies"] = {
"mfs",
"add_lib_ppl",
"binpath",
},
["description"] = "Package manager. For managing packages, bee incursions and other apionic systems.",
["files"] = {