From c82b489c1d8289949e6360d06b1457299917dd1e Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 1 Jan 2014 13:47:14 +0000 Subject: abuild: add get_arch() --- aports/abuild.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'aports') 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 -- cgit v1.2.3