mirror of
https://github.com/correl/rebar.git
synced 2024-11-23 19:19:54 +00:00
Connected up symlinking the list of progs in rebar.config/app_bin
to the OTP bin dir.
This commit is contained in:
parent
c5d877a934
commit
8e91e1014e
3 changed files with 8 additions and 3 deletions
1
rebar.config
Normal file
1
rebar.config
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{app_bin, ["priv/rebar"]}.
|
|
@ -26,7 +26,8 @@
|
||||||
|
|
||||||
-export([rm_rf/1,
|
-export([rm_rf/1,
|
||||||
mkdir_p/1,
|
mkdir_p/1,
|
||||||
cp_r/2]).
|
cp_r/2,
|
||||||
|
ln_sf/2]).
|
||||||
|
|
||||||
-include("rebar.hrl").
|
-include("rebar.hrl").
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,10 @@ install(Config, File) ->
|
||||||
[] ->
|
[] ->
|
||||||
ok;
|
ok;
|
||||||
List ->
|
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.
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,7 +98,7 @@ install(Config, File) ->
|
||||||
install_binaries([], _AppDir, _BinDir) ->
|
install_binaries([], _AppDir, _BinDir) ->
|
||||||
ok;
|
ok;
|
||||||
install_binaries([Bin | Rest], AppDir, BinDir) ->
|
install_binaries([Bin | Rest], AppDir, BinDir) ->
|
||||||
FqBin = filename:join([Bin, AppDir]),
|
FqBin = filename:join([AppDir, Bin]),
|
||||||
rebar_file_utils:ln_sf(FqBin, BinDir),
|
rebar_file_utils:ln_sf(FqBin, BinDir),
|
||||||
install_binaries(Rest, AppDir, BinDir).
|
install_binaries(Rest, AppDir, BinDir).
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue