Skip to content

Commit

Permalink
Fixed a bug when bin_files were not respected if no install_command w…
Browse files Browse the repository at this point in the history
…as specified
  • Loading branch information
yrashk committed Apr 7, 2011
1 parent 4397f91 commit 5b2cf33
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/agner_fetch.erl
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,15 @@ add_path(#opts_rec{ addpath = false }) ->

install_dirs(#opts_rec{ spec = {spec, Spec} } = Opts) ->
io:format("[Installing...]~n"),
BinFiles = case proplists:get_value(install_command, Spec) of
undefined ->
proplists:get_value(bin_files, Spec);
_ ->
undefined
end,
Spec1 = [{install_command,"cp -R " ++ string:join(proplists:get_value(install_dirs, Spec, [])," ") ++
" $AGNER_INSTALL_PREFIX 2>/dev/null && true || true"},
{bin_files, undefined}|Spec],
{bin_files, BinFiles}|Spec],

filelib:ensure_dir(os:getenv("AGNER_EXACT_PREFIX") ++ "/"),
InstallPrefix = set_install_prefix(Opts),
Expand Down

0 comments on commit 5b2cf33

Please sign in to comment.