Open joelpet opened 14 years ago
I ended up with the following very simple patch that is however not optimal:
--- a/bin/update_plugins +++ b/bin/update_plugins @@ -23,10 +23,10 @@ end FileUtils.mkdir_p(bundles_dir) unless File.exist?(bundles_dir) FileUtils.cd(bundles_dir) -Dir['*'].each {|d| FileUtils.rm_rf d} config.each do |plugin| name, dir = plugin['names'].first, plugin['dir'] + FileUtils.rm_rf Dir[dir] if plugin.has_key?('repo') && plugin['repo'] =~ /^git:\/\/.*\.git$/ puts " Unpacking #{name} into #{dir}" `git clone #{plugin['repo']} #{dir}`
Thanks, Joel! Your ideas are very nice. At the weekend I will have a free moment, I'll see what can be done.
I would like to be able to add plugins that are available neither from vim.org nor from a public Git repository. For example, the latest versions of Vim-Latex is only available (?) from http://sourceforge.net/projects/vim-latex.
I have some suggestions on how to achieve this.
external
(or something like that) that works just likeplugin.has_key?('vim_org_id')
but instead contains the full URI of the file.FileUtils.rm_rf
each bundle directory. Instead, just remove the contents of a directory if a new version is found.manual
plugin config type. Let the user add the plugin manually. Then only doFileUtils.rm_rf
on directories that are not specified asmanual
in the config file.Unfortunately, I'm not very familiar with Ruby, which is why I haven't forked and patched your great script.