diff --git a/php/includes/functions.php b/php/includes/functions.php index 5187a70..80c7a32 100644 --- a/php/includes/functions.php +++ b/php/includes/functions.php @@ -16,4 +16,9 @@ function line(string $line): void { line($line); exit($code); -} \ No newline at end of file +} + +function execInDirectory(string $dir, string $command): ?string +{ + return shell_exec(sprintf('cd %s && %s', $dir, $command)); +}