From 1fa6f1c8e282e901338037f28da3403701af1170 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20L=20F=20S=20Bacci?= Date: Wed, 10 Dec 2025 13:48:08 -0300 Subject: [PATCH] Clean ups before new year --- configure.php | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) 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 );