Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 33 lines (25 sloc) 0.695 kb
#!/usr/bin/env escript
%% -*- mode: erlang -*-
-export([main/1]).
%% External API
main([Name]) ->
case Name of
"." ++ _Rest -> usage();
"~" ++ _Rest -> usage();
"/" ++ _Rest -> usage();
_Any -> main([Name, "."])
end;
main([Name, Dest]) ->
ensure(),
DestDir = filename:absname(Dest),
ok = webmachine_skel:skelcopy(DestDir, Name);
main(_) ->
usage().
%% Internal API
ensure() ->
code:add_patha(filename:join(filename:dirname(escript:script_name()),
"../ebin")).
usage() ->
io:format("usage: ~s name [destdir]~n",
[filename:basename(escript:script_name())]),
halt(1).
Jump to Line
Something went wrong with that request. Please try again.