-- -- Author : Dennis Eriksen -- File : utils.lua -- Created : 2024-11-24 -- M = { hasValue = function(arr,val) for _, v in ipairs(arr) do if val == v then return true end end return false end, taskCB = function(rc, stderr, stdout) if rc == 0 then print("task returned 0 - OK") elseif rc ~= 0 then print(string.format("task returned unexpected result: rc=%d stderr=%s stdout=%s", rc, stderr, stdout)) end end, fileExists = function(name) local f = io.open(name, "r") return f ~= nil and io.close(f) end, } return M