diff options
author | Ulf Wiger <ulf@feuerlabs.com> | 2016-02-12 11:15:59 -0800 |
---|---|---|
committer | Ulf Wiger <ulf@feuerlabs.com> | 2016-02-12 11:15:59 -0800 |
commit | 030a31cd8717e8fc3376c42dd4bd088b4a117797 (patch) | |
tree | 0ef4ab150a50438023f97ed96d17260dbd6b5aca /deps/setup | |
parent | 3b8f8579451a37e2c45fc4d2adfb439d72942a13 (diff) | |
download | rvi_core-030a31cd8717e8fc3376c42dd4bd088b4a117797.tar.gz |
Adapt test suite to new scripts, scripts more flexible, bt not default
- rvi_install & rvi_ctl adapted so they can be run from different directories
- ensure that RVI_LOGDIR is respected consistently
- RVI_RUNDIR allows for specifying where the boot scripts are stored
- bt apps excluded by default, can be put back in through config if needed
Diffstat (limited to 'deps/setup')
-rw-r--r-- | deps/setup/src/setup_gen.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/deps/setup/src/setup_gen.erl b/deps/setup/src/setup_gen.erl index 7a74107..d33ccc7 100644 --- a/deps/setup/src/setup_gen.erl +++ b/deps/setup/src/setup_gen.erl @@ -83,7 +83,7 @@ help() -> %% option. %% * `{remove_apps, Apps}' - Remove `Apps' from the list of applications. %% * `{sort_app, App, Before}' - Change the sort order so that `App' comes -%% before `Before'. +%% before `Before'. `Before' can be either %% * `{include, ConfigFile}' - include options from the given file. The file %% is processed using `file:script/2'. %% * `{include_lib, ConfigFile}' - As above, but ConfigFile is named as with @@ -600,7 +600,8 @@ sort_apps(Options, Apps) -> lists:foldl(fun({sort_app, A, Before}, Acc) -> case is_in_set(A, Acc) of {true, App} -> - insert_before(Acc -- [App], App, Before); + insert_before(Acc -- [App], App, + mk_set(Before)); false -> abort("Cannot re-sort ~p - not found~n", [A]) end; @@ -636,6 +637,12 @@ del_from_set(As, Set) -> end end, Set, As). +%% ensure that this is a 'set' (well, at least a list) +mk_set(Set) when is_list(Set) -> + Set; +mk_set(Entry) -> + [Entry]. + is_in_set(Entry, Set) -> A = if is_tuple(Entry) -> element(1, Entry); is_atom(Entry) -> Entry |