filebot/website/download.php

34 lines
1.1 KiB
PHP
Raw Normal View History

<?php
$version = isset($_GET['version']) ? $_GET['version'] : '@{version}'; // default version is hard-coded via deployment script
$arch = $_GET['arch'];
$type = $_GET['type'];
2015-06-02 11:46:09 +00:00
$root = 'https://downloads.sourceforge.net/project/filebot/filebot/';
$folder = $root.'FileBot_'.$version;
2016-04-09 08:33:46 +00:00
$file = '';
2013-08-08 02:59:27 +00:00
if ($type == 'nsis') {
2016-06-12 11:03:54 +00:00
$folder = 'https://app.filebot.net/files';
2013-08-08 02:59:27 +00:00
$file = 'FileBot-setup.exe';
2016-05-11 13:56:45 +00:00
} else if ($type == 'app') {
2016-05-11 14:13:44 +00:00
$folder = 'https://app.filebot.net/files';
2016-05-11 13:56:45 +00:00
$file = 'FileBot.app';
2015-06-01 10:48:35 +00:00
} else if ($type == 'jar') {
2015-06-02 11:46:09 +00:00
$folder = $root.'HEAD';
2015-06-01 10:48:35 +00:00
$file = 'FileBot.jar';
2016-04-09 08:33:46 +00:00
} else if ($type == 'msi') {
$file = 'FileBot_'.$version.'_'.$arch.'.msi';
2016-04-09 08:33:46 +00:00
} else if ($type == 'deb') {
$file = 'filebot_'.$version.'_'.$arch.'.deb';
2016-04-09 08:33:46 +00:00
} else if ($type == 'portable') {
2011-12-28 13:51:36 +00:00
$file = 'FileBot_'.$version.'-portable.zip';
2016-04-09 08:33:46 +00:00
} else if ($type == 'ipkg') {
2015-06-01 10:48:35 +00:00
$file = 'filebot_'.$version.'_noarch.ipk';
} else {
2016-04-19 21:20:07 +00:00
$folder = 'https://sourceforge.net/projects/filebot/files/filebot/FileBot_'.$version; // redirect to latest release folder by default
2016-04-09 08:33:46 +00:00
}
header('HTTP/1.1 302 Found');
2015-06-02 14:34:10 +00:00
header('Location: '.$folder.'/'.$file);
?>