summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@rabbitmq.com>2012-08-08 05:12:35 +0100
committerMatthias Radestock <matthias@rabbitmq.com>2012-08-08 05:12:35 +0100
commit9a72e8980bbabd97cd9ecbc37baa4c799dc64dd9 (patch)
tree55406b9721e5be7a5543796c6121b47b003cb7f5
parent47b74b557c34b1f5b404896ebe4f282134efa19c (diff)
downloadrabbitmq-server-9a72e8980bbabd97cd9ecbc37baa4c799dc64dd9.tar.gz
cosmetic
-rw-r--r--src/rabbit_plugins.erl21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/rabbit_plugins.erl b/src/rabbit_plugins.erl
index 72d1696c..3caa13d7 100644
--- a/src/rabbit_plugins.erl
+++ b/src/rabbit_plugins.erl
@@ -111,7 +111,7 @@ dependencies(Reverse, Sources, AllPlugins) ->
%%----------------------------------------------------------------------------
-prepare_plugins(EnabledFile, PluginsDistDir, DestDir) ->
+prepare_plugins(EnabledFile, PluginsDistDir, ExpandDir) ->
AllPlugins = list(PluginsDistDir),
Enabled = read_enabled(EnabledFile),
ToUnpack = dependencies(false, Enabled, AllPlugins),
@@ -124,18 +124,18 @@ prepare_plugins(EnabledFile, PluginsDistDir, DestDir) ->
end,
%% Eliminate the contents of the destination directory
- case delete_recursively(DestDir) of
+ case delete_recursively(ExpandDir) of
ok -> ok;
{error, E} -> rabbit_misc:quit("Could not delete dir ~s (~p)",
- [DestDir, E])
+ [ExpandDir, E])
end,
- case filelib:ensure_dir(DestDir ++ "/") of
+ case filelib:ensure_dir(ExpandDir ++ "/") of
ok -> ok;
{error, E2} -> rabbit_misc:quit("Could not create dir ~s (~p)",
- [DestDir, E2])
+ [ExpandDir, E2])
end,
- [prepare_plugin(Plugin, DestDir) || Plugin <- ToUnpackPlugins].
+ [prepare_plugin(Plugin, ExpandDir) || Plugin <- ToUnpackPlugins].
prepare_dir_plugin(PluginAppDescFn) ->
%% Add the plugin ebin directory to the load path
@@ -156,12 +156,11 @@ delete_recursively(Fn) ->
Error -> Error
end.
-prepare_plugin(#plugin{type = ez, location = Location}, PluginDestDir) ->
- zip:unzip(Location, [{cwd, PluginDestDir}]);
+prepare_plugin(#plugin{type = ez, location = Location}, ExpandDir) ->
+ zip:unzip(Location, [{cwd, ExpandDir}]);
prepare_plugin(#plugin{type = dir, name = Name, location = Location},
- PluginsDestDir) ->
- rabbit_file:recursive_copy(Location,
- filename:join([PluginsDestDir, Name])).
+ ExpandDir) ->
+ rabbit_file:recursive_copy(Location, filename:join([ExpandDir, Name])).
get_plugin_info(Base, {ez, EZ0}) ->
EZ = filename:join([Base, EZ0]),