Skip to content

Commit

Permalink
Find the shared library
Browse files Browse the repository at this point in the history
  • Loading branch information
msantos committed Mar 13, 2012
1 parent 53585d8 commit d04bd95
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions src/everl.erl
@@ -1,4 +1,4 @@
%% Copyright (c) 2011, Michael Santos <michael.santos@gmail.com> %% Copyright (c) 2011-2012, Michael Santos <michael.santos@gmail.com>
%% All rights reserved. %% All rights reserved.
%% %%
%% Redistribution and use in source and binary forms, with or without %% Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -80,9 +80,17 @@ flag(Flags) when is_list(Flags) ->
lists:foldl(fun(X,F) -> X bor F end, 0, Flags). lists:foldl(fun(X,F) -> X bor F end, 0, Flags).


progname() -> progname() ->
filename:join([ case code:priv_dir(?MODULE) of
filename:dirname(code:which(?MODULE)), {error,bad_name} ->
"..", filename:join([
"priv", filename:dirname(code:which(?MODULE)),
?MODULE "..",
]). "priv",
?MODULE
]);
_ ->
filename:join([
code:priv_dir(?MODULE),
?MODULE
])
end.

0 comments on commit d04bd95

Please sign in to comment.