Skip to content

Instantly share code, notes, and snippets.

@KAllan357
Created August 2, 2012 00:27
Show Gist options
  • Save KAllan357/3231887 to your computer and use it in GitHub Desktop.
Save KAllan357/3231887 to your computer and use it in GitHub Desktop.
logic for finding a Nexus install's optional-plugins and making a symlink for it
available_plugins = Dir.entries("#{node[:nexus][:home]}/nexus/WEB-INF/optional-plugins")
node[:nexus][:plugins].each do |plugin|
matched_plugin = available_plugins.find{|plugin_dir| plugin_dir.match(plugin)}
link "#{node[:nexus][:home]}/nexus/WEB-INF/plugin-repository/#{matched_plugin}" do
to "#{node[:nexus][:home]}/nexus/WEB-INF/optional-plugins/#{matched_plugin}"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment