Skip to content

Commit

Permalink
Changed rake tasks to work on windows
Browse files Browse the repository at this point in the history
Signed-off-by: Snax Fauna <evan+fauna@cloudbur.st>
  • Loading branch information
unknown authored and Snax Fauna committed Apr 28, 2009
1 parent 71968e4 commit d81f278
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tasks/ultrasphinx.rake
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace :ultrasphinx do
task :start => [:_environment] do
FileUtils.mkdir_p File.dirname(Ultrasphinx::DAEMON_SETTINGS["log"]) rescue nil
raise Ultrasphinx::DaemonError, "Already running" if ultrasphinx_daemon_running?
system "searchd --config '#{Ultrasphinx::CONF_PATH}'"
system "searchd --config #{Ultrasphinx::CONF_PATH}"
sleep(4) # give daemon a chance to write the pid file
if ultrasphinx_daemon_running?
say "started successfully"
Expand Down Expand Up @@ -159,7 +159,7 @@ def ultrasphinx_index(index)
rotate = ultrasphinx_daemon_running?
ultrasphinx_create_index_path

cmd = "indexer --config '#{Ultrasphinx::CONF_PATH}'"
cmd = "indexer --config #{Ultrasphinx::CONF_PATH}"
cmd << " #{ENV['OPTS']} " if ENV['OPTS']
cmd << " --rotate" if rotate
cmd << " #{index}"
Expand All @@ -178,7 +178,7 @@ def ultrasphinx_merge
raise "#{index} index is missing" unless File.exist? "#{Ultrasphinx::INDEX_SETTINGS['path']}/sphinx_index_#{index}.spa"
end

cmd = "indexer --config '#{Ultrasphinx::CONF_PATH}'"
cmd = "indexer --config #{Ultrasphinx::CONF_PATH}"
cmd << " #{ENV['OPTS']} " if ENV['OPTS']
cmd << " --rotate" if rotate
cmd << " --merge #{indexes.join(' ')}"
Expand Down

0 comments on commit d81f278

Please sign in to comment.