diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-06-20 09:51:56 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2018-06-20 09:51:56 +0200 |
commit | 353438a94953bf4d093af0d84decd5ec7529ed34 (patch) | |
tree | 4c4e376ff8d831e85954a9b74f2157ad4b06351a /build2/function.cxx | |
parent | c6b3f6659eda9b0b255ddc2d24accdd998b5938d (diff) |
Add $process.run() and $process.run_regex() functions
$process.run(<prog>[ <args>...])
Return trimmed stdout.
$process.run_regex(<prog>[ <args>...], <pat> [, <fmt>])
Return stdout lines matched and optionally processed with regex.
Each line of stdout (including the customary trailing blank) is matched (as a
whole) against <pat> and, if successful, returned, optionally processed with
<fmt>, as an element of a list.
Diffstat (limited to 'build2/function.cxx')
-rw-r--r-- | build2/function.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/build2/function.cxx b/build2/function.cxx index 43dd531..4367185 100644 --- a/build2/function.cxx +++ b/build2/function.cxx @@ -329,6 +329,7 @@ namespace build2 void builtin_functions (); // functions-builtin.cxx void filesystem_functions (); // functions-filesystem.cxx void path_functions (); // functions-path.cxx + void process_functions (); // functions-process.cxx void process_path_functions (); // functions-process-path.cxx void regex_functions (); // functions-regex.cxx void string_functions (); // functions-string.cxx @@ -341,6 +342,7 @@ namespace build2 builtin_functions (); filesystem_functions (); path_functions (); + process_functions (); process_path_functions (); regex_functions (); string_functions (); |