summaryrefslogtreecommitdiff
path: root/src/rebar_appups.erl
diff options
context:
space:
mode:
authorTuncer Ayaz <tuncer.ayaz@gmail.com>2011-06-02 21:03:09 +0200
committerTuncer Ayaz <tuncer.ayaz@gmail.com>2011-06-02 22:09:11 +0200
commit1e342faee804924a79e5ac9a9120a327809448b3 (patch)
treefddea8d37cb0ae77f48604401d61340c948aec7b /src/rebar_appups.erl
parent8eb1fc8308a99410d4ccb9e3ce1b767c7615ac26 (diff)
Apply Tidier suggestions
Diffstat (limited to 'src/rebar_appups.erl')
-rw-r--r--src/rebar_appups.erl17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/rebar_appups.erl b/src/rebar_appups.erl
index df20e43..871c426 100644
--- a/src/rebar_appups.erl
+++ b/src/rebar_appups.erl
@@ -63,9 +63,7 @@
filename:join([NewName, "lib"]), "^.*.appup$"),
%% Convert the list of appup files into app names
- AppUpApps = lists:map(fun(File) ->
- file_to_name(File)
- end, NewAppUpFiles),
+ AppUpApps = [file_to_name(File) || File <- NewAppUpFiles],
%% Create a list of apps that don't already have appups
UpgradeApps = genappup_which_apps(Upgraded, AppUpApps),
@@ -115,7 +113,7 @@ upgraded_app(_, _, _) ->
app_list_diff(List1, List2) ->
List3 = lists:umerge(lists:sort(proplists:get_keys(List1)),
lists:sort(proplists:get_keys(List2))),
- lists:subtract(List3, proplists:get_keys(List2)).
+ List3 -- proplists:get_keys(List2).
file_to_name(File) ->
filename:rootname(filename:basename(File)).
@@ -180,13 +178,10 @@ generate_instruction_advanced(Name, _, _) ->
get_behavior(List) ->
Attributes = proplists:get_value(attributes, List),
- Behavior = case proplists:get_value(behavior, Attributes) of
- undefined ->
- proplists:get_value(behaviour, Attributes);
- Else ->
- Else
- end,
- Behavior.
+ case proplists:get_value(behavior, Attributes) of
+ undefined -> proplists:get_value(behaviour, Attributes);
+ Else -> Else
+ end.
is_code_change(List) ->
Exports = proplists:get_value(exports, List),