Changeset 716db1f for lfs-latest.php


Ignore:
Timestamp:
09/20/2021 07:37:34 AM (3 years ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
multilib
Children:
60870bc
Parents:
e680022 (diff), 7e62bbc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge upstream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lfs-latest.php

    re680022 r716db1f  
    3131  foreach ( $lines as $line )
    3232  {
    33      if ( ! preg_match( $regex_match, $line ) ) continue; 
     33     if ( ! preg_match( $regex_match, $line ) ) continue;
    3434
    3535     // Isolate the version and put in an array
    3636     $slice = preg_replace( $regex_replace, "$1", $line );
    37      if ( $slice == $line ) continue; 
    38 
    39      array_push( $a, $slice );     
     37     if ( $slice == $line ) continue;
     38
     39     array_push( $a, $slice );
    4040  }
    4141
     
    9999  $max           = find_max( $lines, $regex_match, $regex_replace );
    100100
    101   return "$dirpath/$max"; 
     101  return "$dirpath/$max";
    102102}
    103103
     
    113113if ( $package == "e2fsprogs"  ) $dirpath = "http://sourceforge.net/projects/e2fsprogs/files/e2fsprogs";
    114114if ( $package == "expat"      ) $dirpath = "http://sourceforge.net/projects/expat/files";
    115 if ( $package == "elfutils"   ) $dirpath = "https://sourceware.org/ftp/elfutils"; 
    116 if ( $package == "expect"     ) $dirpath = "http://sourceforge.net/projects/expect/files"; 
     115if ( $package == "elfutils"   ) $dirpath = "https://sourceware.org/ftp/elfutils";
     116if ( $package == "expect"     ) $dirpath = "http://sourceforge.net/projects/expect/files";
    117117if ( $package == "file"       ) $dirpath = "https://github.com/file/file/releases";
    118118if ( $package == "flex"       ) $dirpath = "https://github.com/westes/flex/releases";
     
    136136
    137137  // Check for ftp
    138   if ( preg_match( "/^ftp/", $dirpath ) ) 
    139   { 
     138  if ( preg_match( "/^ftp/", $dirpath ) )
     139  {
    140140    $dirpath  = substr( $dirpath, 6 );           // Remove ftp://
    141141    $dirpath  = rtrim ( $dirpath, "/" );         // Trim any trailing slash
     
    145145
    146146    $conn = ftp_connect( $server );
    147     ftp_login( $conn, "anonymous", "" ); 
     147    ftp_login( $conn, "anonymous", "" );
    148148
    149149    // See if we need special handling
     
    164164
    165165              // Get dir listing
    166               $lines = ftp_rawlist ($conn, $path);             
     166              $lines = ftp_rawlist ($conn, $path);
    167167              $max   = find_max( $lines, $regexp, $regexp );
    168168              break;
     
    197197     }
    198198
    199      //if ( $package == "bzip2" ) 
     199     //if ( $package == "bzip2" )
    200200     //{
    201201     //   // Remove one directory
     
    239239  }
    240240
    241   if ( $package == "attr" || 
     241  if ( $package == "attr" ||
    242242       $package == "acl"  )
    243243  {
     
    357357      }
    358358
    359       else if ( preg_match( "/systemd-man-pages/", $file ) ) continue; 
    360       else if ( preg_match( "/python/"         , $file ) ) continue; 
     359      else if ( preg_match( "/systemd-man-pages/", $file ) ) continue;
     360      else if ( preg_match( "/python/"         , $file ) ) continue;
    361361
    362362      $version = preg_replace( $pattern, "$1", $file );   // Isolate version
Note: See TracChangeset for help on using the changeset viewer.