summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFred Hebert <mononcqc@ferd.ca>2017-12-15 11:59:46 -0500
committerGitHub <noreply@github.com>2017-12-15 11:59:46 -0500
commitc67fe9742fcae9c2f1969fe22d5096c1c7828fc5 (patch)
tree470d087aaa1dac3dea64aa8c2158e432c9ea3ded
parent9101a84f49aa58057d6ab9edccaf5409a8b849e8 (diff)
parent718291e5169e08ac901f1109622e76381f7a0ccd (diff)
Merge pull request #1692 from ferd/fix-bootstrap-repeat
Fix repeated bootstrap runs
-rwxr-xr-xbootstrap7
1 files changed, 4 insertions, 3 deletions
diff --git a/bootstrap b/bootstrap
index 92933b6..a765ba1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -168,8 +168,9 @@ compile_file(File, Opts) ->
bootstrap_rebar3() ->
filelib:ensure_dir("_build/default/lib/rebar/ebin/dummy.beam"),
code:add_path("_build/default/lib/rebar/ebin/"),
- ok = symlink_or_copy(filename:absname("src"),
- filename:absname("_build/default/lib/rebar/src")),
+ Res = symlink_or_copy(filename:absname("src"),
+ filename:absname("_build/default/lib/rebar/src")),
+ true = Res == ok orelse Res == exists,
Sources = ["src/rebar_resource.erl" | filelib:wildcard("src/*.erl")],
[compile_file(X, [{outdir, "_build/default/lib/rebar/ebin/"}
,return | additional_defines()]) || X <- Sources],
@@ -648,4 +649,4 @@ join([H|T], Sep) ->
chr(S, C) when is_integer(C) -> chr(S, C, 1).
chr([C|_Cs], C, I) -> I;
chr([_|Cs], C, I) -> chr(Cs, C, I+1);
-chr([], _C, _I) -> 0. \ No newline at end of file
+chr([], _C, _I) -> 0.