function shell_ensure($cmd, &$out = null) { return \taskman_shell_ensure($cmd, $out); }
function taskman_runtasks($tasks, $args = array(), $isolate = false) { global $TASKMAN_SCRIPT; if (!$isolate) { foreach ($tasks as $task_spec) { if (is_array($task_spec)) { taskman_runtask($task_spec[0], $task_spec[1]); } else { taskman_runtask($task_spec, $args); } } } else { $cmd = 'php ' . $TASKMAN_SCRIPT . ' ' . implode(',', $tasks) . ' ' . implode(' ', $args) . ''; foreach (taskman_getprops() as $key => $value) { $cmd .= ' -D ' . $key . '=' . escapeshellarg($value); } taskman_shell_ensure($cmd); } }