summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon Meredith <jon.hg@jonmeredith.com>2009-11-30 12:02:09 -0700
committerJon Meredith <jon.hg@jonmeredith.com>2009-11-30 12:02:09 -0700
commit8e91e1014e665e74138228cf6c8361c196c26268 (patch)
tree65a21a604506cf2c13448f164915edbb3218531c /src
parentc5d877a934e793947eb0140ad3b42a6988fe593d (diff)
Connected up symlinking the list of progs in rebar.config/app_bin
to the OTP bin dir.
Diffstat (limited to 'src')
-rw-r--r--src/rebar_file_utils.erl3
-rw-r--r--src/rebar_otp_app.erl7
2 files changed, 7 insertions, 3 deletions
diff --git a/src/rebar_file_utils.erl b/src/rebar_file_utils.erl
index af47ea8..60b6a59 100644
--- a/src/rebar_file_utils.erl
+++ b/src/rebar_file_utils.erl
@@ -26,7 +26,8 @@
-export([rm_rf/1,
mkdir_p/1,
- cp_r/2]).
+ cp_r/2,
+ ln_sf/2]).
-include("rebar.hrl").
diff --git a/src/rebar_otp_app.erl b/src/rebar_otp_app.erl
index b6c8ea4..8b72baa 100644
--- a/src/rebar_otp_app.erl
+++ b/src/rebar_otp_app.erl
@@ -84,7 +84,10 @@ install(Config, File) ->
[] ->
ok;
List ->
- ok
+ %% code:root_dir() gives $OTPROOT/lib/erlang on a stock install
+ %% so find the bin dir relative to that.
+ BinDir = filename:join([code:root_dir(), "..", "..", "bin"]),
+ install_binaries(List, AppDir, BinDir)
end.
@@ -95,7 +98,7 @@ install(Config, File) ->
install_binaries([], _AppDir, _BinDir) ->
ok;
install_binaries([Bin | Rest], AppDir, BinDir) ->
- FqBin = filename:join([Bin, AppDir]),
+ FqBin = filename:join([AppDir, Bin]),
rebar_file_utils:ln_sf(FqBin, BinDir),
install_binaries(Rest, AppDir, BinDir).