build-pkg: add logging function echo

echo is format + print
log is echo('[build-pkg]', ...)
This commit is contained in:
Boris Nagaev 2015-10-29 22:44:35 +00:00
parent 20bf529ce9
commit 2bdd26e490
1 changed files with 5 additions and 1 deletions

View File

@ -59,8 +59,12 @@ local TARGETS = {
'x86_64-w64-mingw32.shared',
}
local function echo(fmt, ...)
print(fmt:format(...))
end
local function log(fmt, ...)
print('[build-pkg]', fmt:format(...))
echo('[build-pkg]\t' .. fmt, ...)
end
-- based on http://lua-users.org/wiki/SplitJoin