dustin / dotfiles

Finally pushing up my dotfiles from hg.

This URL has Read+Write access

dustin (author)
Sat Nov 07 00:33:30 -0800 2009
commit  f1ab4e0e109f513b583fe84e877b1540eab9396e
tree    9f4aa3669443a4bc366b943e14eb1fc46559f1ab
parent  9246b4e9f61912bd0d7c938e260e4c1934ba990d
dotfiles / .erlang
100644 24 lines (19 sloc) 0.565 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% inet_db:set_lookup([native]).
 
% Set up the path
 
ELibDir = os:getenv("HOME") ++ "/lib/erlang".
 
% io:format("ElibDir is ~p~n", [ELibDir]).
 
case file:list_dir(ELibDir) of
{ok, Libs} ->
lists:foreach(fun (E) ->
Ebin = ELibDir ++ "/" ++ E ++ "/ebin",
case file:read_file_info(Ebin) of
{ok, Info} ->
code:add_path(Ebin);
{error, Reason} ->
error_logger:error_msg("Lib has no ebin: ~p (~p)~n",
[ELibDir ++ "/" + E, Reason])
end
end, Libs);
{error, Reason} ->
error_logger:error_msg("No libs: ~p~n", [Reason])
end.