Changeset e4b4c5a0 for lfs-latest-git.php
- Timestamp:
- 07/01/2024 06:59:19 AM (3 months ago)
- Branches:
- xry111/clfs-ng
- Children:
- 2b63974
- Parents:
- fe48a03 (diff), 201aa93 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lfs-latest-git.php
rfe48a03 re4b4c5a0 16 16 $regex[ 'less' ] = "/^.*current released version is less-(\d+).*$/"; 17 17 $regex[ 'mpfr' ] = "/^mpfr-([\d\.]+)\.tar.*$/"; 18 $regex[ 'Python' ] = "/^.*Latest Python 3.*Python (3[\d\.]+\d).*$/";18 //$regex[ 'Python' ] = "/^.*Latest Python 3.*Python (3[\d\.]+\d).*$/"; 19 19 //$regex[ 'sysvinit' ] = "/^.*sysvinit-([\d\.]+)dsf\.tar.*$/"; 20 20 $regex[ 'tzdata' ] = "/^.*tzdata([\d]+[a-z]).*$/"; … … 78 78 79 79 if ( preg_match( "/sourceforge/", $url ) || 80 preg_match( "/python/", $url ) || 80 81 preg_match( "/psmisc/", $url ) ) 81 82 { … … 135 136 if ( $package == "libffi" ) $dirpath = github("libffi/libffi"); 136 137 if ( $package == "libxcrypt" ) $dirpath = github("besser82/libxcrypt"); 138 if ( $package == "lz" ) $dirpath = github("lz4/lz4"); 137 139 if ( $package == "meson" ) $dirpath = github("mesonbuild/meson"); 138 140 if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc"; … … 146 148 if ( $package == "sysvinit" ) $dirpath = github("slicer69/sysvinit"); 147 149 if ( $package == "MarkupSafe" ) $dirpath = "https://pypi.python.org/pypi/MarkupSafe/"; 148 if ( $package == " Jinja" ) $dirpath = "https://pypi.python.org/pypi/Jinja2/";150 if ( $package == "jinja" ) $dirpath = "https://pypi.python.org/pypi/Jinja2/"; 149 151 if ( $package == "systemd" ) $dirpath = github("systemd/systemd"); 150 152 //if ( $package == "tcl" ) $dirpath = "https://sourceforge.net/projects/tcl/files"; … … 161 163 { 162 164 echo "ftp should not occur\n"; 163 /*164 $dirpath = substr( $dirpath, 6 ); // Remove ftp://165 $dirpath = rtrim ( $dirpath, "/" ); // Trim any trailing slash166 $position = strpos( $dirpath, "/" ); // Divide at first slash167 $server = substr( $dirpath, 0, $position );168 $path = substr( $dirpath, $position );169 170 $conn = ftp_connect( $server );171 ftp_login( $conn, "anonymous", "" );172 173 // See if we need special handling174 if ( isset( $exceptions[ $package ] ) )175 {176 $specials = explode( ":", $exceptions[ $package ] );177 178 foreach ( $specials as $i )179 {180 list( $op, $regexp ) = explode( "=", $i );181 182 switch ($op)183 {184 case "UPDIR":185 // Remove last dir from $path186 $position = strrpos( $path, "/" );187 $path = substr( $path, 0, $position );188 189 // Get dir listing190 $lines = ftp_rawlist ($conn, $path);191 $max = find_max( $lines, $regexp, $regexp );192 break;193 194 case "DOWNDIR":195 // Append found directory196 $path .= "/$max";197 break;198 199 default:200 echo "Error in specials array for $package\n";201 return -5;202 break;203 }204 }205 }206 207 $lines = ftp_rawlist ($conn, $path);208 ftp_close( $conn );209 */210 165 } 211 166 else // http(s) … … 304 259 305 260 if ( $package == "psmisc" ) 306 return find_max( $lines, "/v\d/", "/^.*v([\d\.]+) .tar.*$/" );261 return find_max( $lines, "/v\d/", "/^.*v([\d\.]+)$/" ); 307 262 308 263 if ( $package == "grub" ) 309 264 return find_max( $lines, "/grub/", "/^.*grub-([\d\.]+).tar.xz.*$/" ); 310 265 311 if ( $package == " Jinja" )266 if ( $package == "jinja" ) 312 267 return find_max( $lines, "/Jinja/", "/^.*Jinja2 ([\d\.]+).*$/" ); 268 269 if ( $package == "lz" ) 270 return find_max( $lines, "/name.:/", '/^.*LZ4 v([\d\.]+)".*$/' ); 313 271 314 272 if ( $package == "openssl" ) 315 273 return find_max( $lines, "/openssl/", "/^.*openssl-([\d\.p]*\d.?).tar.*$/" ); 274 275 if ( $package == "Python" ) 276 return find_max( $lines, "/Python 3/", "/^.*Python (3[\d\.]*\d) .*$/" ); 316 277 317 278 if ( $package == "vim" ) … … 333 294 // Fetech from git and get wget-list 334 295 $current = array(); 335 #$lfssvn = "svn://svn.linuxfromscratch.org/LFS/trunk";336 296 $lfsgit = "https://git.linuxfromscratch.org/lfs.git"; 337 297 … … 365 325 $file = rtrim( $file ); 366 326 $pkg_pattern = "/(\D*).*/"; 367 //$pattern = "/\D*(\d.*\d)\D*/";368 327 $pattern = "/\D*(\d.*\d)\D*/"; 369 328
Note:
See TracChangeset
for help on using the changeset viewer.