784: def self.run(argv, input = $stdin, output = $stdout, error = $stderr)
785: ioe = {
786: :input => input,
787: :output => output,
788: :error => error,
789: }
790: opts = { }
791:
792: if argv.include?("--version")
793: output << "minitar \#{Archive::Tar::Minitar::VERSION}\nCopyright 2004 Mauricio Julio Ferna'ndez Pradier and Austin Ziegler\nThis is free software with ABSOLUTELY NO WARRANTY.\n\nsee http://rubyforge.org/projects/ruwiki for more information\n"
794: end
795:
796: if argv.include?("--verbose") or argv.include?("-V")
797: opts[:verbose] = true
798: argv.delete("--verbose")
799: argv.delete("-V")
800: end
801:
802: if argv.include?("--progress") or argv.include?("-P")
803: opts[:progress] = true
804: opts[:verbose] = false
805: argv.delete("--progress")
806: argv.delete("-P")
807: end
808:
809: command = CommandPattern[(argv.shift or "").downcase]
810: command ||= CommandPattern["help"]
811: return command[argv, opts, ioe]
812: end