Skip to content

Commit

Permalink
Make expm download link permanent
Browse files Browse the repository at this point in the history
  • Loading branch information
yrashk committed Oct 2, 2012
1 parent c6d33fb commit 5c46dcc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion USING.md
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ There are two ways to get expm's command line utility:
Go [http://expm.co/](http://expm.co/) and grab it using the download link at the bottom. If you want to do this automatically, use this shell command: Go [http://expm.co/](http://expm.co/) and grab it using the download link at the bottom. If you want to do this automatically, use this shell command:


``` ```
curl -o expm http://expm.co/`curl http://expm.co/__version__`/expm curl -o expm http://expm.co/__download__/expm
``` ```


After downloading the binary, make it executable: After downloading the binary, make it executable:
Expand Down
2 changes: 1 addition & 1 deletion lib/server.ex
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ defmodule Expm.Server do
dispatch = [ dispatch = [
{:_, [{[], Expm.Server.Http, [repository: repository, endpoint: :list]}, {:_, [{[], Expm.Server.Http, [repository: repository, endpoint: :list]},
{["favicon.ico"], :cowboy_static, [file: "favicon.ico", directory: static_dir]}, {["favicon.ico"], :cowboy_static, [file: "favicon.ico", directory: static_dir]},
{["#{Expm.version}","expm"], :cowboy_static, [file: "expm", directory: static_dir]}, {["__download__","expm"], :cowboy_static, [file: "expm", directory: static_dir]},
{["s",:'...'], :cowboy_static, [directory: static_dir, mimetypes: {function(:mimetypes,:path_to_mimes,2), :default}]}, {["s",:'...'], :cowboy_static, [directory: static_dir, mimetypes: {function(:mimetypes,:path_to_mimes,2), :default}]},
{["__version__"], Expm.Server.Http.Version, []}, {["__version__"], Expm.Server.Http.Version, []},
{[:package], Expm.Server.Http, [repository: repository, endpoint: :package]}, {[:package], Expm.Server.Http, [repository: repository, endpoint: :package]},
Expand Down
4 changes: 2 additions & 2 deletions lib/server/templates/page.html.eex
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<input type="text" name="q" class="search-query" placeholder="Search"> <input type="text" name="q" class="search-query" placeholder="Search">
</form> </form>
</li> </li>
<li><a href="/<%= Expm.version %>/expm"><i class="icon-download icon-white"></i><strong>Download</strong></a></li> <li><a href="/__download__/expm"><i class="icon-download icon-white"></i><strong>Download</strong></a></li>
<li><a href="https://github.com/yrashk/expm/blob/master/USING.md">Using</a></li> <li><a href="https://github.com/yrashk/expm/blob/master/USING.md">Using</a></li>
<li><a href="https://github.com/yrashk/expm/blob/master/PUBLISHING.md">Publishing</a></li> <li><a href="https://github.com/yrashk/expm/blob/master/PUBLISHING.md">Publishing</a></li>
<li><a href="https://github.com/yrashk/expm/blob/master/HOSTING.md">Hosting</a></li> <li><a href="https://github.com/yrashk/expm/blob/master/HOSTING.md">Hosting</a></li>
Expand All @@ -47,7 +47,7 @@
<center>This repository is available over HTTP: <code>http://<%= @host %><%= @port %></code></center> <center>This repository is available over HTTP: <code>http://<%= @host %><%= @port %></code></center>
</div> </div>
<div class="row"> <div class="row">
<center><small>Running expm <%= Expm.version %> (<a href="/<%= Expm.version %>/expm">download</a>) on Elixir <center><small>Running expm <%= Expm.version %> (<a href="/__download__/expm">download</a>) on Elixir
<%= System.version %> (<%= {_, sha, _} = System.build_info ; sha %>) <%= System.version %> (<%= {_, sha, _} = System.build_info ; sha %>)
</small></center> </small></center>
</div> </div>
Expand Down

0 comments on commit 5c46dcc

Please sign in to comment.