diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-01-01 13:47:14 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-01-01 13:47:14 +0000 |
commit | c82b489c1d8289949e6360d06b1457299917dd1e (patch) | |
tree | 6882cc62274e353fc56d7952e4d8059792832388 /aports/abuild.lua | |
parent | 8472efdaf400483d905198c53ba21b7759e76d8a (diff) | |
download | lua-aports-c82b489c1d8289949e6360d06b1457299917dd1e.tar.bz2 lua-aports-c82b489c1d8289949e6360d06b1457299917dd1e.tar.xz |
abuild: add get_arch()
Diffstat (limited to 'aports/abuild.lua')
-rw-r--r-- | aports/abuild.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/aports/abuild.lua b/aports/abuild.lua index a9fe8cc..1626b29 100644 --- a/aports/abuild.lua +++ b/aports/abuild.lua @@ -23,4 +23,14 @@ function M.get_conf(var) return abuild_conf[var] end +function M.get_arch() + if abuild_conf.CARCH then + return abuild_conf.CARCH + end + local f = io.popen(" . "..M.functions..' ; echo -n "$CARCH"') + abuild_conf.CARCH = f:read("*all") + f:close() + return abuild_conf.CARCH +end + return M |