filebot/website/download.php

31 lines
904 B
PHP
Raw Normal View History

<?php
2011-12-27 18:57:11 +00:00
$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;
$file = 'undefined';
2013-08-08 02:59:27 +00:00
if ($type == 'nsis') {
2016-02-27 07:05:58 +00:00
$folder = $root.'LATEST';
2013-08-08 02:59:27 +00:00
$file = 'FileBot-setup.exe';
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';
2013-08-08 02:59:27 +00:00
} else if ($type == 'msi')
$file = 'FileBot_'.$version.'_'.$arch.'.msi';
2013-08-08 02:59:27 +00:00
else if ($type == 'deb')
$file = 'filebot_'.$version.'_'.$arch.'.deb';
2013-08-08 02:59:27 +00:00
else if ($type == 'app')
2015-06-01 10:48:35 +00:00
$file = 'FileBot_'.$version.'-brew.tar.bz2';
2013-08-08 02:59:27 +00:00
else if ($type == 'portable')
2011-12-28 13:51:36 +00:00
$file = 'FileBot_'.$version.'-portable.zip';
2013-08-08 02:59:27 +00:00
else if ($type == 'ipkg')
2015-06-01 10:48:35 +00:00
$file = 'filebot_'.$version.'_noarch.ipk';
header('HTTP/1.1 302 Found');
2015-06-02 14:34:10 +00:00
header('Location: '.$folder.'/'.$file);
?>