hotchpotch (owner)

Revisions

gist: 66297 Download_button fork
public
Public Clone URL: git://gist.github.com/66297.git
Embed All Files: show embed
vimp_sync_coderepos.rb #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env ruby
 
require 'pathname'
require 'fileutils'
 
coderepos_dir = Pathname.new(ENV['HOME']).join('svn/coderepos/lang/javascript/vimperator-plugins/trunk/')
vimp_dir = Pathname.new("/mnt/c/Documents\ and\ Settings/gorou/vimperator/plugin/")
 
cc = coderepos_dir.children
vimp_dir.children.each do |plugin|
  if plugin.extname == '.js'
    name = plugin.basename.to_s
    if cc.grep name
      from = coderepos_dir.join name
      to = vimp_dir.join name
      if from.size != to.size
        puts "copy: #{name}"
        FileUtils.cp from.to_s, to.to_s
      end
    end
  end
end