liquid_feedback_frontend
diff env/lf4rcs/exec.lua @ 1219:30523f31b186
Added lf4rcs module and example configuration
author | bsw |
---|---|
date | Mon Nov 30 19:40:38 2015 +0100 (2015-11-30) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/env/lf4rcs/exec.lua Mon Nov 30 19:40:38 2015 +0100 1.3 @@ -0,0 +1,12 @@ 1.4 +function lf4rcs.exec(...) 1.5 + local output, err_message, exit_code = extos.pfilter(nil, ...) 1.6 + local command_parts = {...} 1.7 + for i, part in ipairs(command_parts) do 1.8 + if string.match(part, " ") then 1.9 + command_parts[i] = '"' .. part .. '"' 1.10 + end 1.11 + end 1.12 + local command = table.concat(command_parts, " ") 1.13 + return command, output, err_message, exit_code 1.14 +end 1.15 +