mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 22:34:42 +01:00
18 lines
288 B
PHP
18 lines
288 B
PHP
<?php declare(strict_types=1);
|
|
|
|
$lock = fopen('woodpecker.lock', 'c+');
|
|
flock($lock, LOCK_EX);
|
|
|
|
if (fread($lock, 1) !== "1") {
|
|
exec("tests/setup.sh", $o, $res);
|
|
fwrite($lock, "1");
|
|
} else {
|
|
$o = [];
|
|
$res = 0;
|
|
}
|
|
|
|
flock($lock, LOCK_UN);
|
|
|
|
echo implode("\n", $o);
|
|
exit($res);
|