diff options
author | Manuel Hiebel <leuhmanu@mageia.org> | 2014-06-15 18:18:55 +0200 |
---|---|---|
committer | Manuel Hiebel <leuhmanu@mageia.org> | 2014-06-15 18:18:55 +0200 |
commit | 9a48117e8c00a92152bb5188ff6ef4ed37f5d8da (patch) | |
tree | c354f81d8d39c59f5cc2c07b6736d29b9d0f7931 | |
parent | 9328a596f4a4c16342f73f085a770267ca538fc2 (diff) | |
download | fidd-9a48117e8c00a92152bb5188ff6ef4ed37f5d8da.tar fidd-9a48117e8c00a92152bb5188ff6ef4ed37f5d8da.tar.gz fidd-9a48117e8c00a92152bb5188ff6ef4ed37f5d8da.tar.bz2 fidd-9a48117e8c00a92152bb5188ff6ef4ed37f5d8da.tar.xz fidd-9a48117e8c00a92152bb5188ff6ef4ed37f5d8da.zip |
-Fix regex for comming 4.1 release
-Fix torrents path for stable release
-rw-r--r-- | fidd.php | 8 | ||||
-rw-r--r-- | lib/FIDD.php | 11 |
2 files changed, 11 insertions, 8 deletions
@@ -13,9 +13,9 @@ // params -$prefix = 'Mageia-2-rc'; -$bcd_path = 'mageia2-rc'; -$bcd_url = 'rsync://bcd.mageia.org/isos/%s/'; +$prefix = 'Mageia-4'; +$bcd_path = 'mageia4-v2'; +$bcd_url = 'rsync://isoqa@bcd.mageia.org/isos/%s/'; // don't touch below @@ -27,4 +27,4 @@ FIDD::run(__DIR__, sprintf($bcd_url, $bcd_path), $prefix); echo sprintf("done in %2.2f s.\n", microtime(true) - $ts0); -exit(0);
\ No newline at end of file +exit(0); diff --git a/lib/FIDD.php b/lib/FIDD.php index 8cf78fe..f224796 100644 --- a/lib/FIDD.php +++ b/lib/FIDD.php @@ -99,7 +99,7 @@ class FIDD */ private static function rsync_get_filesizes($url) { - $cmd = sprintf('/usr/bin/rsync -a --list-only %s | awk \'{print $2"\t"$5}\'', + $cmd = sprintf('/usr/bin/rsync -a --list-only --no-h %s | awk \'{print $2"\t"$5}\'', escapeshellarg($url)); $isos = array(); @@ -157,7 +157,10 @@ class FIDD $ret['release'] == '' ? sprintf('iso/%s', $ret['version']) : 'iso/cauldron', str_replace('.iso', '', $data['file']) ); - $data['torrent'] = sprintf('iso/cauldron/torrents/%s', str_replace('.iso', '.torrent', $data['file'])); + $data['torrent'] = sprintf('%s/%s', + $ret['release'] == '' ? sprintf('iso/%s/torrents', $ret['version']) : 'iso/cauldron', + str_replace('.iso', '.torrent', $data['file']) + ); $data['name'] = str_replace(array('-', '.iso', 'i586', 'x86_64'), array(' ', '', '32bit', '64bit'), $data['file']); $data['size'] = $filesizes[$data['file']]; @@ -196,7 +199,7 @@ class FIDD */ public static function is_correct_name($s) { - $re = '/^(Mageia)-(\d+)(-(alpha|beta|RC|rc)(\d*))?(-(.*))?-(i586|x86_64|dual)?(-(CD|DVD|BR))?(-(build\_\w+))?\.(.*)$/'; + $re = '/^(Mageia)-(\d+(.\d)?)(-(alpha|beta|RC|rc)(\d*))?(-(.*))?-(i586|x86_64|dual)?(-(CD|DVD|BR))?(-(build\_\w+))?\.(.*)$/'; if (preg_match($re, $s, $arr)) { $ret = array( 'name' => $arr[1], @@ -212,4 +215,4 @@ class FIDD } return false; } -}
\ No newline at end of file +} |