[DOC-CVS] [doc-base] master: Clean ups before more refactoring
[email protected] (alfsb via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: alfsb (alfsb)
Committer: GitHub (web-flow)
Pusher: alfsb
Date: 2026-02-16T17:52:38-03:00
Commit: https://github.com/php/doc-base/commit/1ca7eeb26469dd16e04773ce0c9b0144d29fb6b4
Raw diff: https://github.com/php/doc-base/commit/1ca7eeb26469dd16e04773ce0c9b0144d29fb6b4.diff
Clean ups before more refactoring
Changed paths:
M configure.php
Diff:
diff --git a/configure.php b/configure.php
index 297a69e071..c32723fa58 100755
--- a/configure.php
+++ b/configure.php
@@ -123,15 +123,12 @@ function errbox($msg) {
echo "| ", $msg, " |", "\n";
echo $line, "\n\n";
}
+
function errors_are_bad($status) {
echo "\nEyh man. No worries. Happ shittens. Try again after fixing the errors above.\n";
exit($status);
}
-function is_windows() {
- return PHP_OS === 'WINNT';
-}
-
function checking($for) // {{{
{
global $ac;
@@ -199,27 +196,6 @@ function globbetyglob($globber, $userfunc)
}
} // }}}
-function find_dot_in($filename) // {{{
-{
- if (substr($filename, -3) == '.in') {
- $GLOBALS['infiles'][] = $filename;
- }
-} // }}}
-
-function generate_output_file($in, $out, $ac) // {{{
-{
- $data = file_get_contents($in);
-
- if ($data === false) {
- return false;
- }
- foreach ($ac as $k => $v) {
- $data = str_replace("@$k@", $v, $data);
- }
-
- return file_put_contents($out, $data);
-} // }}}
-
function make_scripts_executable($filename) // {{{
{
if (substr($filename, -3) == '.sh') {
@@ -575,7 +551,7 @@ function find_xml_files($path) // {{{
}
-// Show local repository status to facilitate debug
+// Show local repository status to facilitate remote debugging
$repos = array();
$repos['doc-base'] = $ac['basedir'];
@@ -587,12 +563,11 @@ function find_xml_files($path) // {{{
foreach ( $repos as $name => $path )
{
$path = escapeshellarg( $path );
- $branch = trim(shell_exec("git -C $path rev-parse --abbrev-ref HEAD"));
- $suffix = $branch == "master" ? "" : " (branch $branch)";
+ $branch = trim( shell_exec( "git -C $path rev-parse --abbrev-ref HEAD" ));
+ $branch = $branch == "master" ? "" : " (branch $branch)";
$output .= str_pad( "$name:" , 10 );
- $output .= rtrim(shell_exec("git -C $path rev-parse HEAD") ?? "") . "$suffix ";
- $output .= rtrim(shell_exec("git -C $path for-each-ref --format=\"%(push:track)\" refs/heads/$branch") ?? "") . "\n";
- $output .= rtrim(shell_exec("git -C $path status -s") ?? "") . "\n";
+ $output .= rtrim( shell_exec( "git -C $path rev-parse HEAD" ) ?? "" . $branch ) . "\n";
+ $output .= rtrim( shell_exec( "git -C $path status -s") ?? "" ) . "\n";
}
while( str_contains( $output , "\n\n" ) )
$output = str_replace( "\n\n" , "\n" , $output );