diff options
| author | leuhmanu <leuhmanu@mageia.org> | 2026-01-10 21:17:37 +0100 |
|---|---|---|
| committer | leuhmanu <leuhmanu@mageia.org> | 2026-01-10 21:17:37 +0100 |
| commit | 967edb4bfcdedf6cbe8f2d25e9174baa134b6535 (patch) | |
| tree | 641f8c3a33e6c687fe3edd2b26d56a5042cfbd02 /lib/FIDD.php | |
| parent | a7b482ebad9b36ce8fa48fd18288868a29ed9521 (diff) | |
| download | fidd-967edb4bfcdedf6cbe8f2d25e9174baa134b6535.tar fidd-967edb4bfcdedf6cbe8f2d25e9174baa134b6535.tar.gz fidd-967edb4bfcdedf6cbe8f2d25e9174baa134b6535.tar.bz2 fidd-967edb4bfcdedf6cbe8f2d25e9174baa134b6535.tar.xz fidd-967edb4bfcdedf6cbe8f2d25e9174baa134b6535.zip | |
Adapt to new mga10 layout and isos
Diffstat (limited to 'lib/FIDD.php')
| -rw-r--r-- | lib/FIDD.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/FIDD.php b/lib/FIDD.php index 6add12a..7c421db 100644 --- a/lib/FIDD.php +++ b/lib/FIDD.php @@ -88,7 +88,7 @@ class FIDD escapeshellarg($url), escapeshellarg($dir)); } else { - $cmd = sprintf('/usr/bin/rsync -avHP --exclude=*.iso --exclude=*.img --include=i586 --include=x86_64 --include=*/install --include=*/install/images --include=*/install/images/* --exclude=* %s %s', + $cmd = sprintf('/usr/bin/rsync -avHP --exclude=*.iso --exclude=*.img --include=i686 --include=x86_64 --include=*/install --include=*/install/images --include=*/install/images/* --exclude=* %s %s', escapeshellarg($url), escapeshellarg($dir)); } @@ -109,7 +109,7 @@ class FIDD $cmd = sprintf('/usr/bin/rsync -a --list-only --no-h %s | awk \'{print $2"\t"$5}\'', escapeshellarg($url)); }else{ - $cmd = sprintf('/usr/bin/rsync -a --list-only --include=i586 --include=x86_64 --include=*/install --include=*/install/images --include=*/install/images/* --exclude=* --no-h %s | awk \'{print $2"\t"$5}\'', + $cmd = sprintf('/usr/bin/rsync -a --list-only --include=i686 --include=x86_64 --include=*/install --include=*/install/images --include=*/install/images/* --exclude=* --no-h %s | awk \'{print $2"\t"$5}\'', escapeshellarg($url)); } $isos = array(); @@ -141,7 +141,7 @@ class FIDD * * @return array */ - function build_definitions($prefix, $dir, $filesizes) + private static function build_definitions($prefix, $dir, $filesizes) { $info = array(); $isos = glob($dir . '/*'); @@ -180,12 +180,12 @@ class FIDD // skip the first one } else if (null !== ($ret = self::is_correct_name($data['file']))) { $data['path'] = sprintf('%s/%s', - $ret['release'] == '' ? sprintf('iso/%s', $ret['version']) : sprintf('iso/cauldron%s', $prefix), + $ret['release'] == '' ? sprintf('iso/%s', $ret['version']) : sprintf('iso/%s', $prefix), str_replace('.iso', '', $data['file']) ); $torrentfile = str_replace('.iso', '.torrent', $data['file']); $data['torrent'] = sprintf('%s/%s', - $ret['release'] == '' ? sprintf('iso/%s/torrents', $ret['version']) : sprintf('iso/cauldron%s/torrents', $prefix), + $ret['release'] == '' ? sprintf('iso/%s/torrents', $ret['version']) : sprintf('iso/%s/torrents', $prefix), $torrentfile ); $torrentfile = "var/tmp/torrents/".$torrentfile; @@ -193,7 +193,7 @@ class FIDD magnet($torrentfile), str_replace('.iso', '', $data['file']), 'udp%3A%2F%2Ftracker.torrent.eu.org%3A451&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337'); - $data['name'] = str_replace(array('-', '.iso', 'i586', 'x86_64'), array(' ', '', '32bit', '64bit'), $data['file']); + $data['name'] = str_replace(array('-', '.iso', 'i686', 'x86_64'), array(' ', '', '32bit', '64bit'), $data['file']); $data['size'] = $filesizes[$data['file']]; $info[$data['file']] = $data; @@ -215,7 +215,7 @@ class FIDD * * @return array */ - function build_definitions_net_install($prefix, $dir, $filesizes, $netinstall_rename) + private static function build_definitions_net_install($prefix, $dir, $filesizes, $netinstall_rename) { $info = array(); $isos = glob($dir . '/*/install/images/'); @@ -247,18 +247,18 @@ class FIDD { $rename = str_replace('Cauldron', $netinstall_rename, $data['file']); $data['path'] = sprintf('%s/%s/install/images', - sprintf('distrib/cauldron%s', $prefix), + sprintf('distrib/%s', $prefix), $ret['arch'] ); - $data['name'] = str_replace(array('-', '.iso', 'i586', 'x86_64'), array(' ', '', '32bit', '64bit'), $rename); + $data['name'] = str_replace(array('-', '.iso', 'i686', 'x86_64'), array(' ', '', '32bit', '64bit'), $rename); $data['size'] = $filesizes[$data['file']]; $info[$rename] = $data; } else { $data['path'] = sprintf('%s/%s/install/images', - $ret['release'] == '' ? sprintf('distrib/%s', $ret['version']) : sprintf('distrib/cauldron%s', $prefix), + $ret['release'] == '' ? sprintf('distrib/%s', $ret['version']) : sprintf('distrib/%s', $prefix), $ret['arch'] ); - $data['name'] = str_replace(array('-', '.iso', 'i586', 'x86_64'), array(' ', '', '32bit', '64bit'), $data['file']); + $data['name'] = str_replace(array('-', '.iso', 'i686', 'x86_64'), array(' ', '', '32bit', '64bit'), $data['file']); $data['size'] = $filesizes[$data['file']]; $info[$data['file']] = $data; } @@ -296,7 +296,7 @@ class FIDD */ public static function is_correct_name($s) { - $re = '/^(Mageia)-(\d+(.\d)?|Cauldron)(-(alpha|beta|RC|rc)(\d*))?(-(.*))?-(i586|x86_64|dual)?(-(CD|DVD|BR))?(-(build\_\w+))?\.(.*)$/'; + $re = '/^(Mageia)-(\d+(.\d)?|Cauldron)(-(alpha|beta|RC|rc)(\d*))?(-(.*))?-(i686|x86_64|dual)?(-(CD|DVD|BR))?(-(build\_\w+))?\.(.*)$/'; if (preg_match($re, $s, $arr)) { $ret = array( 'name' => $arr[1], |
