You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by eh...@apache.org on 2007/03/22 10:40:05 UTC
svn commit: r521173 - /lucene/solr/trunk/client/ruby/solr-ruby/Rakefile
Author: ehatcher
Date: Thu Mar 22 02:40:04 2007
New Revision: 521173
URL: http://svn.apache.org/viewvc?view=rev&rev=521173
Log:
Fix install_solr_ruby so duplicate subdirectory is not created on subsequent runs
Modified:
lucene/solr/trunk/client/ruby/solr-ruby/Rakefile
Modified: lucene/solr/trunk/client/ruby/solr-ruby/Rakefile
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/client/ruby/solr-ruby/Rakefile?view=diff&rev=521173&r1=521172&r2=521173
==============================================================================
--- lucene/solr/trunk/client/ruby/solr-ruby/Rakefile (original)
+++ lucene/solr/trunk/client/ruby/solr-ruby/Rakefile Thu Mar 22 02:40:04 2007
@@ -95,7 +95,8 @@
desc "Install the Rails plugin version into the vendor/plugins dir. Need to set PLUGINS_DIR environment variable."
task :install_solr_ruby => :package do
plugins_dir = ENV["PLUGINS_DIR"] or raise "You must set PLUGINS_DIR"
- File.cp_r(File.join("pkg","rails", "solr-ruby-rails-#{SOLR_RUBY_VERSION}/"), File.join(plugins_dir, "solr-ruby-rails-#{SOLR_RUBY_VERSION}/"))
+ mkdir File.join(plugins_dir, "solr-ruby-rails-#{SOLR_RUBY_VERSION}/") rescue nil
+ File.cp_r(File.join("pkg","rails", "solr-ruby-rails-#{SOLR_RUBY_VERSION}/"), plugins_dir)
end
end
@@ -160,10 +161,10 @@
count = 0
open(fn) do |f|
while line = f.gets
- count += 1
- if line =~ pattern
- puts "#{fn}:#{count}:#{line}"
- end
+ count += 1
+ if line =~ pattern
+ puts "#{fn}:#{count}:#{line}"
+ end
end
end
end