X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=bin%2Fmailshears;h=d9d16253cee734bba0428d64c0cbf07d036de669;hp=c5efabb32b5b1be125275c7f17279421d23b5f58;hb=826f82992ce99a35a1b7fc1ac973611371610dd7;hpb=3763f510274a2ec7ce894122dc26d1ded6055cfc diff --git a/bin/mailshears b/bin/mailshears index c5efabb..d9d1625 100755 --- a/bin/mailshears +++ b/bin/mailshears @@ -1,14 +1,13 @@ #!/usr/bin/ruby -wU # -# mailshears, to prune unused mail directories (and more). +# mailshears, to mangle your mail garden # # Load all of our lib/ code. require 'mailshears' # Define a usage string using the program name. -exe = File.basename($PROGRAM_NAME) -usage = "#{exe} [prune | rm | mv ]" +program_name = File.basename($PROGRAM_NAME) # Defaults mode_name = 'prune' @@ -48,7 +47,7 @@ end # here. Report it and exit with a failure code. if not args_error_message.nil? then STDERR.puts args_error_message - puts "Usage: #{usage}" + puts "Usage: #{UserInterface.usage(program_name)}" Kernel.exit(ExitCodes::BAD_COMMAND_LINE) end @@ -115,7 +114,7 @@ ensure $stdout = STDOUT if output_buffer.size > 0 then - puts make_header(exe, plugin_module.to_s()) + puts UserInterface.make_header(program_name, plugin_module.to_s()) puts output_buffer.string() end end