diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-30 09:25:10 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-09-30 09:25:10 +0000 |
commit | aa65657a763cab55e87bdfcef97bd440d0caf354 (patch) | |
tree | e8c9c5d3c187bdb0e8323be9a3e9f1ecae3d3970 /aports.lua | |
parent | 0b836466143a7ff7f9fd45cd5a2a4f7a1ec3663f (diff) | |
download | abuild-aa65657a763cab55e87bdfcef97bd440d0caf354.tar.gz abuild-aa65657a763cab55e87bdfcef97bd440d0caf354.tar.bz2 abuild-aa65657a763cab55e87bdfcef97bd440d0caf354.tar.xz abuild-aa65657a763cab55e87bdfcef97bd440d0caf354.zip |
aports.lua: read variables frrom abuild.conf
Diffstat (limited to 'aports.lua')
-rwxr-xr-x | aports.lua | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1,5 +1,18 @@ module(..., package.seeall) +abuild_conf_file = "/etc/abuild.conf" + +local abuild_conf = {} + +function get_abuild_conf(var) + if abuild_conf[var] == nil then + local f = io.popen(" . "..abuild_conf_file..' ; echo -n "$'..var..'"') + abuild_conf[var] = f:read("*all") + f:close() + end + return abuild_conf[var] +end + local function split_subpkgs(str) local t = {} local e |