diff options
author | theiw <none@none> | 2010-02-05 17:34:38 +0000 |
---|---|---|
committer | theiw <none@none> | 2010-02-05 17:34:38 +0000 |
commit | 788bd3df726933334ee9c570e1e920829c5d1c4c (patch) | |
tree | ed11edbb52295a81179f7e181c40a4ce30827c87 /src/rebar_utils.erl | |
parent | 30a3816c8649bbafb3695780c78c4eabbaa92eda (diff) |
Provide package support for eunit; build_plt now includes listed applications; begin including -spec annotations
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r-- | src/rebar_utils.erl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl index 5f1612c..7265058 100644 --- a/src/rebar_utils.erl +++ b/src/rebar_utils.erl @@ -4,7 +4,7 @@ %% %% rebar: Erlang Build Tools %% -%% Copyright (c) 2009 Dave Smith (dizzyd@dizzyd.com) +%% Copyright (c) 2009, 2010 Dave Smith (dizzyd@dizzyd.com) %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this software and associated documentation files (the "Software"), to deal @@ -33,7 +33,8 @@ sh_failfast/2, find_files/2, now_str/0, - ensure_dir/1]). + ensure_dir/1, + beam_to_mod/2, beams/1]). -include("rebar.hrl"). @@ -132,3 +133,12 @@ sh_loop(Port) -> {Port, {exit_status, Rc}} -> {error, Rc} end. + +beam_to_mod(Dir, Filename) -> + [Dir | Rest] = filename:split(Filename), + list_to_atom(filename:basename(string:join(Rest, "."), ".beam")). + +beams(Dir) -> + filelib:fold_files(Dir, ".*\.beam\$", true, + fun(F, Acc) -> [F | Acc] end, []). + |