lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject svn commit: r521173 - /lucene/solr/trunk/client/ruby/solr-ruby/Rakefile
Date Thu, 22 Mar 2007 09:40:05 GMT
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



Mime
View raw message