Skip to content
Browse files

AGNER_INSTALL_PREFIX should be available for build, too (example: ./c…

…onfigure --prefix=)
  • Loading branch information...
1 parent 84ada00 commit 858f8c6a76cd2ad4ffe42bd55c3dce21606d2fec @yrashk yrashk committed Feb 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/agner_main.erl
View
4 src/agner_main.erl
@@ -405,6 +405,8 @@ handle_command(fetch, Opts) ->
Caveats when is_list(Caveats) ->
io:format("=== CAVEATS ===~n~n~s~n~n",[Caveats])
end,
+ InstallPrefix = filename:join([os:getenv("AGNER_PREFIX"),"packages",Package ++ "-" ++ Version]),
+ os:putenv("AGNER_INSTALL_PREFIX", InstallPrefix),
case proplists:get_value(build, Opts) of
true ->
@@ -449,10 +451,8 @@ handle_command(fetch, Opts) ->
ignore;
true ->
filelib:ensure_dir(filename:join([os:getenv("AGNER_PREFIX"),"packages"]) ++ "/"),
- InstallPrefix = filename:join([os:getenv("AGNER_PREFIX"),"packages",Package ++ "-" ++ Version]),
os:cmd("rm -rf " ++ InstallPrefix),
ok = filelib:ensure_dir(InstallPrefix ++ "/"),
- os:putenv("AGNER_INSTALL_PREFIX", InstallPrefix),
case proplists:get_value(install_command, Spec) of
undefined ->
io:format("ERROR: No install_command specified, can't install this package~n");

0 comments on commit 858f8c6

Please sign in to comment.
Something went wrong with that request. Please try again.