From 3fb4a7c540da227382ea0831c0c6424765900123 Mon Sep 17 00:00:00 2001 From: Tuncer Ayaz Date: Tue, 17 Jun 2014 10:49:03 +0200 Subject: 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. --- bootstrap | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bootstrap') 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, -- cgit v1.1