mirror of
https://github.com/Adorable-Catgirl/LuaComp.git
synced 2024-11-01 08:00:56 +11:00
17 lines
408 B
Lua
17 lines
408 B
Lua
-- This Source Code Form is subject to the terms of the Mozilla Public
|
|
-- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
-- file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
|
|
svar = {}
|
|
|
|
do
|
|
local stdlib = require("posix.stdlib")
|
|
|
|
function svar.get(var)
|
|
return os.getenv(var)
|
|
end
|
|
|
|
function svar.set(var, val)
|
|
return stdlib.setenv(var, val and tostring(val) or nil)
|
|
end
|
|
end |