Method: Commands::Update#parse!

Defined in:
lib/commands/plugin.rb

#parse!(args) ⇒ Object



818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
# File 'lib/commands/plugin.rb', line 818

def parse!(args)
  options.parse!(args)
  root = @base_command.environment.root
  cd root
  args = Dir["vendor/plugins/*"].map do |f|
    File.directory?("#{f}/.svn") ? File.basename(f) : nil
  end.compact if args.empty?
  cd "vendor/plugins"
  args.each do |name|
    if File.directory?(name)
      puts "Updating plugin: #{name}"
      system("svn #{$verbose ? '' : '-q'} up \"#{name}\" #{@revision ? "-r #{@revision}" : ''}")
    else
      puts "Plugin doesn't exist: #{name}"
    end
  end
end