Difference between revisions of "Template:Dl"
Jump to navigation
Jump to search
(fix using parameter) |
(fixed link to criu 2.x) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | [ | + | <includeonly>{{#ifexpr: {{#sub:{{{1}}}|0|1}} >= 3 | [[github:checkpoint-restore/criu/archive/v{{{1}}}/criu-{{{1}}}.tar.gz | criu-{{{1}}}.tar.gz]] | [[dl:criu/criu-{{{1}}}.tar.bz2|criu-{{{1}}}.tar.bz2]] }}</includeonly><noinclude> |
+ | |||
+ | This produces a download link for a given version. | ||
+ | |||
+ | * for releases < 3, it links to download.openvz.org (interwiki <code>dl:</code>), and uses tar.bz2. | ||
+ | * for releases >= 3, it links to github.org (interwiki <code>github:</code>), and uses tar.gz. | ||
+ | |||
+ | == Examples == | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! Wiki code !! Result | ||
+ | |- | ||
+ | | <code><nowiki>{{Dl|2.3}}</nowiki></code> || {{Dl|2.3}} | ||
+ | |- | ||
+ | | <code><nowiki>{{Dl|3.14}}</nowiki></code> || {{Dl|3.14}} | ||
+ | |- | ||
+ | |} | ||
+ | </noinclude> |
Latest revision as of 16:41, 23 September 2021
This produces a download link for a given version.
- for releases < 3, it links to download.openvz.org (interwiki
dl:
), and uses tar.bz2. - for releases >= 3, it links to github.org (interwiki
github:
), and uses tar.gz.
Examples[edit]
Wiki code | Result |
---|---|
{{Dl|2.3}} |
criu-2.3.tar.bz2 |
{{Dl|3.14}} |
criu-3.14.tar.gz |