summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2010-05-11 14:46:20 -0700
committerBob Ippolito <bob@redivi.com>2010-05-11 14:46:20 -0700
commitfc58d12820d6457d768ca6b17e1ff000b53e400d (patch)
tree924d23f527f772cde12db06e3322254f59ab6e21
parent124897e937878cc1d1ab55a18a7b2ca9d9c7f658 (diff)
fix hg and git clone commands for when repo does not exactly match application name
-rw-r--r--src/rebar_deps.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rebar_deps.erl b/src/rebar_deps.erl
index 46d7657..7d07ff4 100644
--- a/src/rebar_deps.erl
+++ b/src/rebar_deps.erl
@@ -254,11 +254,11 @@ use_source(AppDir, App, VsnRegex, Source, Count) ->
download_source(AppDir, {hg, Url, Rev}) ->
ok = filelib:ensure_dir(AppDir),
- rebar_utils:sh(?FMT("hg clone -U ~s", [Url]), [], filename:dirname(AppDir)),
+ rebar_utils:sh(?FMT("hg clone -U ~s ~s", [Url, filename:basename(AppDir)]), [], filename:dirname(AppDir)),
rebar_utils:sh(?FMT("hg update ~s", [Rev]), [], AppDir);
download_source(AppDir, {git, Url, Rev}) ->
ok = filelib:ensure_dir(AppDir),
- rebar_utils:sh(?FMT("git clone -n ~s", [Url]), [], filename:dirname(AppDir)),
+ rebar_utils:sh(?FMT("git clone -n ~s ~s", [Url, filename:basename(AppDir)]), [], filename:dirname(AppDir)),
rebar_utils:sh(?FMT("git checkout ~s", [Rev]), [], AppDir);
download_source(AppDir, {bzr, Url, Rev}) ->
ok = filelib:ensure_dir(AppDir),