summaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2014-06-17 10:49:03 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2014-07-25 20:52:30 +0200
commit3fb4a7c540da227382ea0831c0c6424765900123 (patch)
tree8a47941bbc34397269c9b42a84e33db6d0294476 /bootstrap
parente8a6cfe04ab0612dcd089c7aed035520e3dd9aee (diff)
Fix OS X resource fork handling (Reported-by: Richard O'Keefe)
If you happen to fetch a zip archive of the git repo and try to build from that, you may, for example, ask erlc to build src/._rebar.erl. ._* are OS X resource forks and not real .erl files. This may also happen with network filesystems on OS X. To fix that, limit the files compiled by rebar to include only those which start with a letter or a digit.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap4
1 files changed, 3 insertions, 1 deletions
diff --git a/bootstrap b/bootstrap
index df09f7e..7d9a1c1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -47,7 +47,9 @@ main(Args) ->
end,
%% Compile all src/*.erl to ebin
- case make:files(filelib:wildcard("src/*.erl"),
+ %% To not accidentally try to compile files like Mac OS X resource forks,
+ %% we only look for rebar source files that start with a letter.
+ case make:files(filelib:wildcard("src/[a-zA-Z]*.erl"),
[{outdir, "ebin"}, {i, "include"},
DebugFlag,
NamespacedTypes,