Commit f7e32f56 authored by Johann Bauer's avatar Johann Bauer

Show unstable builds in top selection

parent dff40c16
......@@ -96,7 +96,7 @@ function get_dl_link($flavor, $version, $file = null)
$files = get_binary_files();
// Get the latest stable version number, fallback to 1.1.10.
$stable = '1.1.10';
$latest = '1.1.10';
foreach ($files as $file) {
if ($file->stability === 'stable') {
$stable = $file->version;
......@@ -104,6 +104,13 @@ foreach ($files as $file) {
}
}
if (isset($_GET['show-unstable'])) {
$latest = reset($files)->version;
}
else {
$latest = $stable;
}
// Save binary details of latest stable version to "binaries.json".
save_binaries_json($files, $stable);
......@@ -122,47 +129,47 @@ save_binaries_json($files, $stable);
<h1>Borg ARM builds</h1> <br>Currently there are automated builds for three different versions of ARM hardware:
<div class="flavor">
<a class="download" href="<?php echo get_dl_link('armv5', $stable); ?>">
<a class="download" href="<?php echo get_dl_link('armv5', $latest); ?>">
<h2>ARMv5 / ARMv4t</h2><br>
<b class="download-link">Borg <?php echo $stable; ?><br><br><?php echo human_filesize($files["borg-{$stable}-armv5"]->size ?? null); ?></b>
<b class="download-link">Borg <?php echo $latest; ?><br><br><?php echo human_filesize($files["borg-{$latest}-armv5"]->size ?? null); ?></b>
</a>
<span class="description">
This version is built for 32Bit-ARM CPUs without a Floating-Point-Unit (ARM v4t and v5).<br>
<br>
A lot of NAS devices are using this type of hardware.<br>
<code>
<b class="command">wget</b> <b class="url"><?php echo get_dl_link('armv5', $stable); ?></b> -O <b class="file">/usr/bin/borg</b><br>
<b class="command">wget</b> <b class="url"><?php echo get_dl_link('armv5', $latest); ?></b> -O <b class="file">/usr/bin/borg</b><br>
<b class="command">chmod</b> a+x <b class="file">/usr/bin/borg</b>
</code>
</span>
</div>
<div class="flavor">
<a class="download" href="<?php echo get_dl_link('armv6', $stable); ?>">
<a class="download" href="<?php echo get_dl_link('armv6', $latest); ?>">
<h2>ARMv7 / ARMv6</h2><br>
<b class="download-link">Borg <?php echo $stable ?><br><br><?php echo human_filesize($files["borg-{$stable}-armv6"]->size ?? null); ?></b>
<b class="download-link">Borg <?php echo $latest ?><br><br><?php echo human_filesize($files["borg-{$latest}-armv6"]->size ?? null); ?></b>
</a>
<span class="description">
This version is built for 32Bit-ARM CPUs with a Floating-Point-Unit (ARM v6 and v7).<br>
<br>A lot of modern ARM boards and devices ship with a floating-point unit (FPU).
This includes Raspberry Pis and some powerful NAS devices.<br>
<code>
<b class="command">wget</b> <b class="url"><?php echo get_dl_link('armv6', $stable); ?></b> -O <b class="file">/usr/bin/borg</b><br>
<b class="command">wget</b> <b class="url"><?php echo get_dl_link('armv6', $latest); ?></b> -O <b class="file">/usr/bin/borg</b><br>
<b class="command">chmod</b> a+x <b class="file">/usr/bin/borg</b>
</code>
</span>
</div>
<div class="flavor">
<a class="download" href="<?php echo get_dl_link('arm64', $stable); ?>">
<a class="download" href="<?php echo get_dl_link('arm64', $latest); ?>">
<h2>ARMv8 (or ARM64)</h2><br>
<b class="download-link">Borg <?php echo $stable ?><br><br><?php echo human_filesize($files["borg-{$stable}-arm64"]->size ?? null); ?></b>
<b class="download-link">Borg <?php echo $latest ?><br><br><?php echo human_filesize($files["borg-{$latest}-arm64"]->size ?? null); ?></b>
</a>
<span class="description">
This version is built for modern 64Bit-ARM CPUs (ARM v8).<br>
Examples include modern smartphones or the Pine64.<br>
<code>
<b class="command">wget</b> <b class="url"><?php echo get_dl_link('arm64', $stable); ?></b> -O <b class="file">/usr/bin/borg</b><br>
<b class="command">wget</b> <b class="url"><?php echo get_dl_link('arm64', $latest); ?></b> -O <b class="file">/usr/bin/borg</b><br>
<b class="command">chmod</b> a+x <b class="file">/usr/bin/borg</b>
</code>
</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment