mirror of
https://git.shadowkat.net/izaya/OC-PsychOS2.git
synced 2024-11-26 04:57:24 -05:00
made import work, added unimport, aliased rm to fs.remove
This commit is contained in:
parent
4d0ce1e06d
commit
39ea9c1a18
@ -22,6 +22,19 @@ function shutil.import(lib)
|
|||||||
end
|
end
|
||||||
require(lib)
|
require(lib)
|
||||||
nE[#nE+1] = lib
|
nE[#nE+1] = lib
|
||||||
|
os.setenv("INCLUDE",nE)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
function shutil.unimport(lib)
|
||||||
|
local cE = os.getenv("INCLUDE") or shell.include
|
||||||
|
local nE = {}
|
||||||
|
for k,v in pairs(cE) do
|
||||||
|
if v ~= lib then
|
||||||
|
nE[#nE+1] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
os.setenv("INCLUDE",nE)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -103,5 +116,6 @@ end
|
|||||||
shutil.cd = os.chdir
|
shutil.cd = os.chdir
|
||||||
shutil.mkdir = fs.makeDirectory
|
shutil.mkdir = fs.makeDirectory
|
||||||
shutil.cp = fs.copy
|
shutil.cp = fs.copy
|
||||||
|
shutil.rm = fs.remove
|
||||||
|
|
||||||
return shutil
|
return shutil
|
||||||
|
Loading…
Reference in New Issue
Block a user