commit 1a1bbb65a5be1b138d0c8ac3fbf107bfb84fb3ee parent ab72039bc063924a82698503ae12d196e0905c17 Author: William Morgan <wmorgan-sup@masanjin.net> Date: Sat, 2 Jan 2010 16:36:50 -0500 add warnings about ferret deprecation Diffstat:
| M | bin/sup | | | 32 | ++++++++++++++++++++++++++++++++ |
1 file changed, 32 insertions(+), 0 deletions(-) diff --git a/bin/sup b/bin/sup @@ -150,6 +150,34 @@ module_function :start_cursing, :stop_cursing Index.init Index.lock_interactively or exit + +if Index.is_a_deprecated_ferret_index? + FERRET_DEPRECATION_WARNING_FN = File.join BASE_DIR, "you-have-been-warned-about-ferret-deprecation" + unless File.exist? FERRET_DEPRECATION_WARNING_FN + $stderr.puts <<EOS +Warning! Your 30-day trial period for using Sup is almost over! + +To purchase the full version of Sup, please see http://sup.rubyforge.org/. + +Just kidding. BUT! You are using an old Ferret index. The Ferret backend is +deprecated and support will be removed in the next version of Sup. + +You should convert to Xapian before that happens. + +The conversion process may take several hours. It is safe and interruptable. +You can start it at any point by typing: + + sup-convert-ferret-index + +Press enter to continue and be on your way. You won't see this message +again, just a brief reminder at shutdown. +EOS + + $stdin.gets + FileUtils.touch FERRET_DEPRECATION_WARNING_FN + end +end + begin Redwood::start Index.load @@ -390,4 +418,8 @@ EOS end end +if Index.is_a_deprecated_ferret_index? + puts "Reminder: to update your Ferret index to Xapian, run sup-convert-ferret-index." +end + end