Permalink
Browse files

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

…as specified
  • Loading branch information...
1 parent 4397f91 commit 5b2cf336dc8c8c384a080f251f150565e8c23d36 @yrashk yrashk committed Apr 4, 2011
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/agner_fetch.erl
View
@@ -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),

0 comments on commit 5b2cf33

Please sign in to comment.