summaryrefslogtreecommitdiff
path: root/src/rebar_utils.erl
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2010-02-13 10:18:18 -0700
committerDave Smith <dizzyd@dizzyd.com>2010-02-13 10:18:18 -0700
commit0f7b47ce7b2e946a0ff98fb96e0b82cfc55fd7bb (patch)
tree9d3ffbea766de7205e66a7d4b28e1d51aa9a70ce /src/rebar_utils.erl
parentd486dff6e8c05ec87bd18c0ae1d3d050d9703ce2 (diff)
parent96c1ceba6007551812add22d585f46256d78e106 (diff)
Merging w/ mainline
Diffstat (limited to 'src/rebar_utils.erl')
-rw-r--r--src/rebar_utils.erl8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rebar_utils.erl b/src/rebar_utils.erl
index 7265058..1e99caa 100644
--- a/src/rebar_utils.erl
+++ b/src/rebar_utils.erl
@@ -28,6 +28,7 @@
-export([get_cwd/0,
is_arch/1,
+ get_arch/0,
get_os/0,
sh/2, sh/3,
sh_failfast/2,
@@ -48,14 +49,17 @@ get_cwd() ->
is_arch(ArchRegex) ->
- Arch = erlang:system_info(system_architecture),
- case re:run(Arch, ArchRegex, [{capture, none}]) of
+ case re:run(get_arch(), ArchRegex, [{capture, none}]) of
match ->
true;
nomatch ->
false
end.
+get_arch() ->
+ Words = integer_to_list(8 * erlang:system_info(wordsize)),
+ erlang:system_info(system_architecture) ++ "-" ++ Words.
+
get_os() ->
Arch = erlang:system_info(system_architecture),
case match_first([{"linux", linux}, {"darwin", darwin}], Arch) of