forked from Feuerlabs/exometer_collectd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rebar.config.script
32 lines (30 loc) · 1.03 KB
/
rebar.config.script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
%% -*- erlang -*-
%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%
%% Copyright (C) 2014 Feuerlabs Inc. All rights reserved.
%%
%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at http://mozilla.org/MPL/2.0/.
%%
%%---- END COPYRIGHT ---------------------------------------------------------
Script = fun(D,S,Vs) ->
Scr = filename:join(D, S),
case file:script(Scr, orddict:store('SCRIPT', Scr, Vs)) of
{ok, Res} ->
Res;
{error,_} = Err ->
io:fwrite("Error evaluating script ~s~n", [S]),
Err
end
end.
CFG1 = case os:getenv("REBAR_DEPS") of
false ->
CONFIG;
[] ->
CONFIG;
Dir ->
lists:keystore(deps_dir, 1, CONFIG, {deps_dir, Dir})
end.
Priv = filename:join(filename:dirname(SCRIPT), "priv").
Script(Priv, "check_edown.script", [{'CONFIG', CFG1}]).