atr/templates/download-all.html (112 lines of code) (raw):

{% extends "layouts/base.html" %} {% block title %} Download {{ release.project.display_name }} {{ release.version }} ~ ATR {% endblock title %} {% block description %} Download commands for {{ release.project.display_name }} {{ release.version }}. {% endblock description %} {% block content %} {% set phase = release.phase.value %} <p class="d-flex justify-content-between align-items-center"> <a href="{{ back_url }}" class="atr-back-link">← Back to {{ phase|replace('_', ' ') |title }}</a> {% if phase != "release" %} <span> {% if phase == "release_candidate_draft" %} <strong class="atr-phase-one atr-phase-symbol">①</strong> <span class="atr-phase-one atr-phase-label">COMPOSE</span> <span class="atr-phase-arrow">→</span> <span class="atr-phase-symbol-other">②</span> <span class="atr-phase-arrow">→</span> <span class="atr-phase-symbol-other">③</span> {% elif phase == "release_candidate" %} <span class="atr-phase-symbol-other">①</span> <span class="atr-phase-arrow">→</span> <strong class="atr-phase-two atr-phase-symbol">②</strong> <span class="atr-phase-two atr-phase-label">VOTE</span> <span class="atr-phase-arrow">→</span> <span class="atr-phase-symbol-other">③</span> {% elif phase == "release_preview" %} <span class="atr-phase-symbol-other">①</span> <span class="atr-phase-arrow">→</span> <span class="atr-phase-symbol-other">②</span> <span class="atr-phase-arrow">→</span> <strong class="atr-phase-three atr-phase-symbol">③</strong> <span class="atr-phase-three atr-phase-label">FINISH</span> {% endif %} </span> {% endif %} </p> <h1> Download all files in <strong>{{ release.project.short_display_name }}</strong> <em>{{ release.version }}</em> </h1> <p class="border rounded p-3 mb-3"> <i class="bi bi-info-circle me-1"></i> {% set file_count, total_bytes, formatted_size = get_release_stats(release) %} This release consists of {% if file_count == 1 %} <code>{{ file_count }}</code> file {% else %} <code>{{ file_count }}</code> files {% endif %} with a total size of <code>{{ formatted_size }}</code>. </p> <h2 id="download-zip">Download ZIP archive</h2> <p> Download a single ZIP archive containing all files for this release below. The archive is generated on the fly, which may take a while for very large releases. </p> <p> <a href="{{ as_url(routes.download.zip_selected, project_name=release.project.name, version_name=release.version) }}" class="btn btn-primary btn-lg"> <i class="bi bi-file-earmark-zip me-2"></i>Download {{ release.name }}.zip </a> </p> <h2>Alternative methods</h2> <p>If you prefer, you can download the files using other methods.</p> <p> <a href="#download-browser" class="btn btn-sm btn-outline-secondary me-2" title="Download using your browser">Browser</a> <a href="#download-curl" class="btn btn-sm btn-outline-secondary me-2" title="Download using curl">Curl</a> <a href="#download-rsync" class="btn btn-sm btn-outline-secondary me-2" title="Download using rsync">Rsync</a> <a href="#download-wget" class="btn btn-sm btn-outline-secondary me-2" title="Download using wget">Wget</a> </p> <h3 id="download-browser" class="mt-4">Using your browser</h3> <p> You can download the files one by one using your browser from the <a href="{{ as_url(routes.download.path_empty, project_name=release.project.name, version_name=release.version) }}">download folder</a>. Clicking a link to any file will download it, as it is served as <code>application/octet-stream</code>. </p> <h3 id="download-curl" class="mt-4">Using curl</h3> <p>You can download all of the files in this release using curl with the following command:</p> <!-- TODO: Add a button to copy the command to the clipboard --> <pre class="bg-light border rounded p-3 mb-3"> curl{% if server_domain.startswith("127.0.0.1") %} --insecure{% endif %} -fsS https://{{ server_domain }}{{ as_url(routes.download.sh_selected, project_name=release.project.name, version_name=release.version) }} |{% if server_domain.startswith("127.0.0.1") %} CURL_EXTRA=--insecure{% endif %} sh </pre> <p> This downloads the files into the <em>current directory</em>. Ensure that you create a new empty directory, and change to it, before running the command. The script requires curl and a POSIX compliant version of sh. It works by downloading a POSIX complaint shell script straight into your shell. You can of course <a href="{{ as_url(routes.download.sh_selected, project_name=release.project.name, version_name=release.version) }}">download the script</a> and audit it before running it. </p> <h3 id="download-rsync" class="mt-4">Using rsync</h3> <p>You can download all of the files in this release using rsync with the following command:</p> <!-- TODO: Add a button to copy the command to the clipboard --> <pre class="bg-light border rounded p-3 mb-3"> rsync -av -e 'ssh -p 2222' {{ asf_id }}@{{ server_domain }}:/{{ release.project.name }}/{{ release.version }}/ ${DOWNLOAD_PATH}/ </pre> {% include "user-ssh-keys.html" %} <h3 id="download-wget" class="mt-4">Using wget</h3> <p>You can download all of the files in this release using wget with the following command:</p> <pre class="bg-light border rounded p-3 mb-3"> wget -r -np -nH --cut-dirs=4 --default-page=.index.html{% if server_domain.startswith("127.0.0.1") %} --no-check-certificate{% endif %} https://{{ server_domain }}{{ as_url(routes.download.path_empty, project_name=release.project.name, version_name=release.version) }} </pre> <p> This downloads the files into the <em>current directory</em>. Ensure that you create a new empty directory, and change to it, before running the command. </p> {% endblock content %} {% block stylesheets %} {{ super() }} {% endblock stylesheets %} {% block javascripts %} {{ super() }} {% endblock javascripts %}