aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fidd.php8
-rw-r--r--lib/FIDD.php11
2 files changed, 11 insertions, 8 deletions
diff --git a/fidd.php b/fidd.php
index 0e19a35..2a1a47e 100644
--- a/fidd.php
+++ b/fidd.php
@@ -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
+}