-- --- T2-COPYRIGHT-NOTE-BEGIN --- -- T2 SDE: package/*/sam/sam_monitor.lua -- Copyright (C) 2006 - 2022 The T2 SDE Project -- -- This Copyright note is generated by scripts/Create-CopyPatch, -- more information can be found in the files COPYING and README. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License version 2. -- --- T2-COPYRIGHT-NOTE-END --- local _NAME = "monitor" local _DESCRIPTION = "Monitor the build process of a given config." local _USAGE = [[monitor This will show the build log of the respective configuration. ]] require "sam.config" local function main(...) sam.info(_NAME, "main() in module %s\n", _NAME) local t2dir = os.getenv("T2DIR") or "." if not arg[1] then sam.error(_NAME, "missing config name") return end local cfg = sam.config(arg[1]) local log = t2dir .. "/build/" .. cfg.ID .. "/TOOLCHAIN/logs/build_target.log" os.execute("tail -f " .. log) end -- SAM MODULE INIT --------------------------------------------------------- return { _NAME = _NAME, _DESCRIPTION = _DESCRIPTION, _USAGE = _USAGE, main = main, }