Permalink
Browse files

Fixed a bug when bin_files were not respected if no install_command w…

…as specified
  • Loading branch information...
1 parent 6a0fa8d commit 86b22a3e912c9f067c848b583e63617a1376eef9 @yrashk yrashk committed Apr 4, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/agner_fetch.erl
View
@@ -528,9 +528,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),

0 comments on commit 86b22a3

Please sign in to comment.