aboutsummaryrefslogtreecommitdiffstats
path: root/src/rcl_prv_assembler.erl
diff options
context:
space:
mode:
authorEric <[email protected]>2012-11-21 17:18:16 -0500
committerJordan Wilberding <[email protected]>2012-11-21 16:44:05 -0700
commitdac49bf161dbfda40a08e5b3baa756a715bcc231 (patch)
treedf29bba9e7246b8148d6adb65ccf78445f9abb49 /src/rcl_prv_assembler.erl
parent85bd84de42e29d3c222757a6d211483114851e79 (diff)
downloadrelx-dac49bf161dbfda40a08e5b3baa756a715bcc231.tar.gz
relx-dac49bf161dbfda40a08e5b3baa756a715bcc231.tar.bz2
relx-dac49bf161dbfda40a08e5b3baa756a715bcc231.zip
all relcool to symlink in 'overridden' apps
Signed-off-by: Jordan Wilberding <[email protected]>
Diffstat (limited to 'src/rcl_prv_assembler.erl')
-rw-r--r--src/rcl_prv_assembler.erl23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/rcl_prv_assembler.erl b/src/rcl_prv_assembler.erl
index 59d9946..7ed4f68 100644
--- a/src/rcl_prv_assembler.erl
+++ b/src/rcl_prv_assembler.erl
@@ -100,15 +100,20 @@ copy_app(LibDir, App) ->
AppVsn = rcl_app_info:vsn_as_string(App),
AppDir = rcl_app_info:dir(App),
TargetDir = filename:join([LibDir, AppName ++ "-" ++ AppVsn]),
- ec_plists:map(fun(SubDir) ->
- copy_dir(AppDir, TargetDir, SubDir)
- end, ["ebin",
- "include",
- "priv",
- "src",
- "c_src",
- "README",
- "LICENSE"]).
+ case rcl_app_info:link(App) of
+ true ->
+ file:make_symlink(AppDir, TargetDir);
+ false ->
+ ec_plists:map(fun(SubDir) ->
+ copy_dir(AppDir, TargetDir, SubDir)
+ end, ["ebin",
+ "include",
+ "priv",
+ "src",
+ "c_src",
+ "README",
+ "LICENSE"])
+ end.
copy_dir(AppDir, TargetDir, SubDir) ->
SubSource = filename:join(AppDir, SubDir),