build/controllers/DevController.php
public function actionRun($command)
    {
        $command = implode(' ', \func_get_args());

        // root of the dev repo
        $base = \dirname(\dirname(__DIR__));
        $dirs = $this->listSubDirs("$base/extensions");
        $dirs = array_merge($dirs, $this->listSubDirs("$base/apps"));
        asort($dirs);

        $oldcwd = getcwd();
        foreach ($dirs as $dir) {
            $displayDir = substr($dir, \strlen($base));
            $this->stdout("Running '$command' in $displayDir...\n", Console::BOLD);
            chdir($dir);
            passthru($command);
            $this->stdout("done.\n", Console::BOLD, Console::FG_GREEN);
        }
        chdir($oldcwd);
    }
public function actionRun($command)
    {
        $command = implode(' ', \func_get_args());

        // root of the dev repo
        $base = \dirname(\dirname(__DIR__));
        $dirs = $this->listSubDirs("$base/extensions");
        $dirs = array_merge($dirs, $this->listSubDirs("$base/apps"));
        asort($dirs);

        $oldcwd = getcwd();
        foreach ($dirs as $dir) {
            $displayDir = substr($dir, \strlen($base));
            $this->stdout("Running '$command' in $displayDir...\n", Console::BOLD);
            chdir($dir);
            passthru($command);
            $this->stdout("done.\n", Console::BOLD, Console::FG_GREEN);
        }
        chdir($oldcwd);
    }
Runs a command in all extension and application directories.

Can be used to run e.g. `git pull`.

./build/build dev/run git pull

@param string $command the command to run