namespace :ultrasphinx do
desc "Swap the pistonized ultraspinx checkout with Evan's local dev version"
task :switch do
Dir.chdir(RAILS_ROOT) do
location = "#{RAILS_ROOT}/vendor/plugins/ultrasphinx"
if `ls -ld #{location}` =~ /fauna/
system("rm #{location}")
Dir.chdir("vendor/plugins") do
system("svn up")
end
puts "Using checkout"
else
system("rm -rf #{location}")
system("ln -s /Users/eweaver/p/fauna/ultrasphinx/trunk #{location}")
system("rm -rf #{location}/pkg")
puts "Using local dev copy"
end
end
end
end