chiark / gitweb /
website: jarrg is released
[ypp-sc-tools.main.git] / yarrg / web / upload
index 0c8eefdda43a65655411d16126d10493add6625b..6de28be2189230ad4909f98024bce366c599bccc 100755 (executable)
 
 </%doc>
 <& docshead &>
 
 </%doc>
 <& docshead &>
-<%perl>
+<%shared>
 my $url_base_base= 'http://yarrg.chiark.net/download/jarrg';
 my $url_base_base= 'http://yarrg.chiark.net/download/jarrg';
-my $download_version= 'test';
-my $url_base= "$url_base_base/$download_version";
-</%perl>
+</%shared>
+<%def downloadurl><%args>
+$leaf
+$test => 0
+#        ^ change this to change the default version
+</%args><%perl>
+my $download_version= $test ? '/test' : '';
+my $url_base= "$url_base_base$download_version";
+my $url= $url_base.'/'.$leaf;
+</%perl><a href="<% $url %>"><%
+    $m->has_content ? $m->content : $url
+%></a></%def>
 <h1>Uploading to YARRG</h1>
 <p>
 
 <h1>Uploading to YARRG</h1>
 <p>
 
@@ -96,7 +105,7 @@ report the problem to us, not to Three Rings.
 <h3>Installing and running on Linux</h3>
 
 Download
 <h3>Installing and running on Linux</h3>
 
 Download
-<a href="<% $url_base %>/jarrg.tar.gz"><% $url_base %>/jarrg.tar.gz</a>
+<& downloadurl, leaf => 'jarrg-linux.tar.gz' &>
 and unpack it.  You run jarrg from the command line.  Change
 (<code>cd</code>) to the top level <code>jarrg</code> directory
 which was created when you unpacked the tarball, and then run
 and unpack it.  You run jarrg from the command line.  Change
 (<code>cd</code>) to the top level <code>jarrg</code> directory
 which was created when you unpacked the tarball, and then run
@@ -110,7 +119,7 @@ ordinary Puzzle Pirates startup script, which is normally
 <h3>Installing on Windows</h3>
 
 Download
 <h3>Installing on Windows</h3>
 
 Download
-<a href="<% $url_base %>/jarrg-setup.exe"><% $url_base %>/jarrg-setup.exe</a>
+<& downloadurl, leaf => 'jarrg-setup.exe' &>
 and double-click on it.  It will either:
 <ol>
 <li>Just work, in which case you'll have a new icon on your desktop which
 and double-click on it.  It will either:
 <ol>
 <li>Just work, in which case you'll have a new icon on your desktop which
@@ -182,15 +191,15 @@ the MIT-style two-clause licence.
 
 <p>
 
 
 <p>
 
-The download directory can contains other versions (eg unreleased test
-versions), which you can see here:
- <a href="<% $url_base_base %>/"><% $url_base_base %>/</a> .
+The code for the downloadable binaries is in
+in <& downloadurl, leaf=>'jarrg-source.tar.gz' &>.
+The download directory also sometimes contains other versions
+(eg unreleased test versions), which you can see here:
+ <& downloadurl, leaf => '', test => 0 &>
 
 <p>
 
 
 <p>
 
-The source code for the downloadable released binaries is in the
-<a href="<% $url_base %>/jarrg.tar.gz">Linux
-tarball</a>.  We maintain JARRG in git, and you can get
+We maintain JARRG in git, and you can get
 source code for recent and perhaps unreleased versions from one of:
 <pre>
 git://git.yarrg.chiark.net/jarrg-ian.git</code> <a href="http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=jarrg-ian.git;a=summary">(gitweb)</a>
 source code for recent and perhaps unreleased versions from one of:
 <pre>
 git://git.yarrg.chiark.net/jarrg-ian.git</code> <a href="http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=jarrg-ian.git;a=summary">(gitweb)</a>