Added a ver() macro to make changing the I2P version across the site easier

This commit is contained in:
str4d
2012-12-13 21:36:49 +00:00
parent 00700e66cf
commit 0ebefb6156
5 changed files with 21 additions and 16 deletions

View File

@@ -14,39 +14,39 @@ or type <tt>java -version</tt> at your command prompt.
<h3>Clean installs</h3>
<ul class="downloadlist">
<li><b>Windows Graphical installer:</b><br />
<a href="{{ url_for('downloads_select', file='i2pinstall_0.9.3_windows.exe') }}">i2pinstall_0.9.3_windows.exe</a>
<a href="{{ url_for('downloads_select', file=ver('i2pinstall_%s_windows.exe')) }}">i2pinstall_{{ ver() }}_windows.exe</a>
(SHA256
762964ab582801be1c9d45843c682f791c284d4fa7b1e1ee733ea4ef033d4907
<a href="{{ url_for('downloads_select', file='i2pinstall_0.9.3_windows.exe.sig') }}">sig</a>)<br />
<a href="{{ url_for('downloads_select', file=ver('i2pinstall_%s_windows.exe.sig')) }}">sig</a>)<br />
Download that file and run it.
</li>
<li><b>Linux / OS X / BSD / Solaris Graphical installer:</b><br />
<a href="{{ url_for('downloads_select', file='i2pinstall_0.9.3.jar') }}">i2pinstall_0.9.3.jar</a>
<a href="{{ url_for('downloads_select', file=ver('i2pinstall_%s.jar')) }}">i2pinstall_{{ ver() }}.jar</a>
(SHA256
4ebea74b30064c9853c40cf24764d283dc6fff47ed2449b247f3c9991cccb494
<a href="{{ url_for('downloads_select', file='i2pinstall_0.9.3.jar.sig') }}">sig</a>)<br />
<a href="{{ url_for('downloads_select', file=ver('i2pinstall_%s.jar.sig')) }}">sig</a>)<br />
Download that file and double-click it (if that works) or
type <code>java -jar i2pinstall_0.9.3.jar</code> in a terminal to run the
type <code>java -jar i2pinstall_{{ ver() }}.jar</code> in a terminal to run the
installer.
On some platforms you may be able to right-click and select
&quot;Open with Java&quot;.</li>
<li><b>Linux / OS X / BSD / Solaris Command line (headless) install:</b><br />
Download the graphical installer file above and
run <code>java -jar i2pinstall_0.9.3.jar -console</code> from the command line.
run <code>java -jar i2pinstall_{{ ver() }}.jar -console</code> from the command line.
</li>
<li><a href="{{ url_for('downloads_select', lang=g.lang, file='debian') }}">Packages for Debian &amp; Ubuntu</a></li>
<li><b>Source install:</b><br />
<a href="{{ url_for('downloads_select', file='i2psource_0.9.3.tar.bz2') }}">i2psource_0.9.3.tar.bz2</a>
<a href="{{ url_for('downloads_select', file=ver('i2psource_%s.tar.bz2')) }}">i2psource_{{ ver() }}.tar.bz2</a>
(SHA256
39a7d6859bf4bd9ac56fd83a5e32d47d1b24ba06f912a027804492ca941936dd
<a href="{{ url_for('downloads_select', file='i2psource_0.9.3.tar.bz2.sig') }}">sig</a>)<br />
<a href="{{ url_for('downloads_select', file=ver('i2psource_%s.tar.bz2.sig')) }}">sig</a>)<br />
Alternately, you can fetch the source from <a href="newdevelopers#getting-the-i2p-code">monotone</a>.
<br />
Run <code>(tar xjvf i2psource_0.9.3.tar.bz2 ; cd i2p-0.9.3 ; ant pkg)</code> then either
Run <code>(tar xjvf i2psource_{{ ver() }}.tar.bz2 ; cd i2p-{{ ver() }} ; ant pkg)</code> then either
run the GUI installer or headless install as above</li>
</ul>
@@ -119,10 +119,10 @@ receive the release.
<h3>Updates from earlier releases (manual method):</h3>
<ol>
<li>Download <a href="{{ url_for('downloads_select', file='i2pupdate_0.9.3.zip') }}">i2pupdate_0.9.3.zip</a>
<li>Download <a href="{{ url_for('downloads_select', file=ver('i2pupdate_%s.zip')) }}">i2pupdate_{{ ver() }}.zip</a>
(SHA256
2381e4a845c6cc0c0d9f27f99571984bcbf448ef041bc1f7a2ba8715228d6377
<a href="{{ url_for('downloads_select', file='i2pupdate_0.9.3.zip.sig') }}">sig</a>) to your I2P
<a href="{{ url_for('downloads_select', file=ver('i2pupdate_%s.zip.sig')) }}">sig</a>) to your I2P
installation directory and <b>rename as i2pupdate.zip</b>.
(alternately, you can get the source as above and run "ant updater", then copy the
resulting i2pupdate.zip to your I2P installation directory). You do

View File

@@ -1,4 +1,4 @@
{%- from "global/macros" import site_url, change_lang with context -%}
{%- from "global/macros" import site_url, change_lang, ver with context -%}
<!DOCTYPE html>
<html lang="en">
<head>

View File

@@ -12,3 +12,8 @@
{%- else -%}{{ url_for('site_show', lang=lang) }}
{%- endif -%}
{%- endmacro -%}
{%- macro ver(string=None) -%}
{%- if string -%}{{ string % '0.9.3' }}
{%- else -%}{{ '0.9.3' }}
{%- endif -%}
{%- endmacro -%}

View File

@@ -3,10 +3,10 @@
<li class="has-sub"><a href="#"><span>{{ _('Download') }}</span></a>
<ul>
<li><a href="{{ url_for('downloads_list', lang=g.lang) }}"><span>{{ _('Download I2P') }}</span></a></li>
<li><a href="{{ url_for('downloads_select', file='i2pinstall_0.9.3_windows.exe') }}"><span>{{ _('Windows installer') }}</span></a></li>
<li><a href="{{ url_for('downloads_select', file='i2pinstall_0.9.3.jar') }}"><span>{{ _('Linux / OS X / BSD / Solaris installer') }}</span></a></li>
<li><a href="{{ url_for('downloads_select', file=ver('i2pinstall_%s_windows.exe')) }}"><span>{{ _('Windows installer') }}</span></a></li>
<li><a href="{{ url_for('downloads_select', file=ver('i2pinstall_%s.jar')) }}"><span>{{ _('Linux / OS X / BSD / Solaris installer') }}</span></a></li>
<li><a href="{{ url_for('downloads_select', file='debian') }}"><span>{{ _('Debian / Ubuntu packages') }}</span></a></li>
<li><a href="{{ url_for('downloads_select', file='i2psource_0.9.3.tar.bz2') }}"><span>{{ _('Source package') }}</span></a></li>
<li><a href="{{ url_for('downloads_select', file=ver('i2psource_%s.tar.bz2')) }}"><span>{{ _('Source package') }}</span></a></li>
</ul>
</li>
<li class="has-sub"><a href="#"><span>{{ _('About') }}</span></a>

View File

@@ -4,7 +4,7 @@
<div class="main">
<h1>{% trans %}What does I2P do for you?{% endtrans %}</h1>
<p>{% trans %}The I2P network provides strong privacy protections for communication over the Internet. Many activities that would risk your privacy on the public Internet can be conducted anonymously on I2P.{% endtrans %}</p>
<a class="get-i2p" href="{{ url_for('downloads_list', lang=g.lang) }}">{% trans version='0.9.3' %}Get I2P {{ version }}{% endtrans %}</a>
<a class="get-i2p" href="{{ url_for('downloads_list', lang=g.lang) }}">{% trans version=ver() %}Get I2P {{ version }}{% endtrans %}</a>
</div>
<div class="aside-wrap">
<div class="aside">