aboutsummaryrefslogtreecommitdiffstats
path: root/lfs-latest-git.php
diff options
context:
space:
mode:
authorPierre Labastie <pierre.labastie@neuf.fr>2021-09-07 23:10:29 +0200
committerPierre Labastie <pierre.labastie@neuf.fr>2021-09-07 23:10:29 +0200
commit3781c69cbc45591ea4ac06868a65a0ee84151edd (patch)
treecdd1e2c5a8b8e19a027f17b9240838064dc684a9 /lfs-latest-git.php
parent4458e3d2d88184e1c5b566f8bac38b6015abd81e (diff)
Remove eol spaces
Diffstat (limited to 'lfs-latest-git.php')
-rw-r--r--lfs-latest-git.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/lfs-latest-git.php b/lfs-latest-git.php
index 6130d48d1..a581792af 100644
--- a/lfs-latest-git.php
+++ b/lfs-latest-git.php
@@ -30,13 +30,13 @@ function find_max( $lines, $regex_match, $regex_replace )
foreach ( $lines as $line )
{
- if ( ! preg_match( $regex_match, $line ) ) continue;
+ if ( ! preg_match( $regex_match, $line ) ) continue;
// Isolate the version and put in an array
$slice = preg_replace( $regex_replace, "$1", $line );
- if ( $slice == $line ) continue;
+ if ( $slice == $line ) continue;
- array_push( $a, $slice );
+ array_push( $a, $slice );
}
// SORT_NATURAL requires php-5.4.0 or later
@@ -98,7 +98,7 @@ function max_parent( $dirpath, $prefix )
$regex_replace = "#^.*(${prefix}[\d\.]+)/.*$#";
$max = find_max( $lines, $regex_match, $regex_replace );
- return "$dirpath/$max";
+ return "$dirpath/$max";
}
function get_packages( $package, $dirpath )
@@ -112,8 +112,8 @@ if ( $package == "bc" ) $dirpath = "https://github.com/gavinhoward/bc/re
if ( $package == "check" ) $dirpath = "https://github.com/libcheck/check/releases";
if ( $package == "e2fsprogs" ) $dirpath = "https://sourceforge.net/projects/e2fsprogs/files/e2fsprogs/";
if ( $package == "expat" ) $dirpath = "http://sourceforge.net/projects/expat/files";
-if ( $package == "elfutils" ) $dirpath = "https://sourceware.org/ftp/elfutils";
-if ( $package == "expect" ) $dirpath = "http://sourceforge.net/projects/expect/files";
+if ( $package == "elfutils" ) $dirpath = "https://sourceware.org/ftp/elfutils";
+if ( $package == "expect" ) $dirpath = "http://sourceforge.net/projects/expect/files";
if ( $package == "file" ) $dirpath = "https://github.com/file/file/releases";
if ( $package == "flex" ) $dirpath = "https://github.com/westes/flex/releases";
if ( $package == "gcc" ) $dirpath = max_parent( $dirpath, "gcc-" );
@@ -138,8 +138,8 @@ if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/rel
//if ( $package == "vim" ) $dirpath = "ftp://ftp.vim.org/pub/vim/unix";
// Check for ftp
- if ( preg_match( "/^ftp/", $dirpath ) )
- {
+ if ( preg_match( "/^ftp/", $dirpath ) )
+ {
$dirpath = substr( $dirpath, 6 ); // Remove ftp://
$dirpath = rtrim ( $dirpath, "/" ); // Trim any trailing slash
$position = strpos( $dirpath, "/" ); // Divide at first slash
@@ -147,7 +147,7 @@ if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/rel
$path = substr( $dirpath, $position );
$conn = ftp_connect( $server );
- ftp_login( $conn, "anonymous", "" );
+ ftp_login( $conn, "anonymous", "" );
// See if we need special handling
if ( isset( $exceptions[ $package ] ) )
@@ -166,7 +166,7 @@ if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/rel
$path = substr( $path, 0, $position );
// Get dir listing
- $lines = ftp_rawlist ($conn, $path);
+ $lines = ftp_rawlist ($conn, $path);
$max = find_max( $lines, $regexp, $regexp );
break;
@@ -233,7 +233,7 @@ if ( $package == "zstd" ) $dirpath = "https://github.com/facebook/zstd/rel
$lines = $tmp;
}
- if ( $package == "attr" ||
+ if ( $package == "attr" ||
$package == "acl" )
{
return find_max( $lines, "/$package/", "/^.*$package-([\d\.-]*\d).tar.*$/" );
@@ -361,8 +361,8 @@ function get_current()
$pattern = "/\D*(\d.*[a-z]*)\.tar\D*/";
}
- else if ( preg_match( "/systemd-man-pages/", $file ) ) continue;
- else if ( preg_match( "/python/" , $file ) ) continue;
+ else if ( preg_match( "/systemd-man-pages/", $file ) ) continue;
+ else if ( preg_match( "/python/" , $file ) ) continue;
$version = preg_replace( $pattern, "$1", $file ); // Isolate version
$version = preg_replace( "/^\d-/", "", $version ); // Remove leading #-