Skip to content

Commit

Permalink
Add a little helper file to make the Erlang modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ummon committed Oct 28, 2013
1 parent cb27109 commit 6487abc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/erl/d_lan_urlrewrite.erl
Expand Up @@ -3,7 +3,11 @@

-include("/usr/lib/yaws/include/yaws_api.hrl"). % Should use 'include_lib' but code: code:lib_dir(yaws). return {error,bad_name}.

arg_rewrite(Arg) ->
arg_rewrite(Arg) ->
% For testing purpose.
% {ok, F} = file:open("/tmp/out.txt", [write]),
% io:format(F, "~p~n", [Arg]),
% file:close(F),
Req = Arg#arg.req,
{abs_path, Path} = Req#http_request.path,
NPath = {abs_path,
Expand All @@ -12,9 +16,5 @@ arg_rewrite(Arg) ->
N -> "/?p=" ++ string:substr(Path, 2, N - 2) ++ string:substr(Path, N + 5)
end
},
% For testing purpose.
%{ok, F} = file:open("/tmp/out.txt", [write]),
%io:format(F, "~p~n", [Path]),
%file:close(F),
Arg#arg{req = Req#http_request{path = NPath}}.

4 changes: 4 additions & 0 deletions tools/make.sh
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd ../modules
make
cd ../tools

0 comments on commit 6487abc

Please sign in to comment.