Sha256: 3d43dc14f81f0fc0d57bf755fd9628909dd21ed14fbfc50fd17a507262b82c51
Contents?: true
Size: 1.74 KB
Versions: 4
Compression:
Stored size: 1.74 KB
Contents
#!/usr/bin/env ruby # # review: Wrapper command to call subcommand # # ex. # review epubmaker config.yml # -> call `review-epubmaker config.yml` # # Copyright (c) 2017-2018 Kenshi Muto, Masayoshi Takahashi # # This program is free software. # You can distribute or modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # For details of the GNU LGPL, see the file "COPYING". require 'pathname' bindir = Pathname.new(__FILE__).realpath.dirname $LOAD_PATH.unshift((bindir + '../lib').realpath) require 'review' def usage message = <<-EOB usage: review <command> [<args>] Re:VIEW commands are: init : generate Re:VIEW project directory. preproc : preprocess Re:VIEW document file. compile : convert Re:VIEW document file. epubmaker : build EPUB. webmaker : build web pages. pdfmaker : build PDF with LaTeX. textmaker : build text files. vol : show volume of Re:VIEW document. check : check there are no REJECT words in the document. index : show heading list. validate : validate Re:VIEW document files. version : show Re:VIEW version. --help : show this message. EOB print message exit 1 end usage if ARGV.length == 0 || ARGV[0] == '--help' if ARGV[0] == 'version' puts ReVIEW::VERSION exit end command = "review-#{ARGV.shift}" bindir = Pathname.new(__FILE__).realpath.dirname command_path = File.join(bindir, command) unless File.exist?(command_path) print "cannot find command: #{command}\n\n" usage end if RUBY_PLATFORM =~ /mswin|bccwin|mingw/ cmd = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) cmd << RbConfig::CONFIG['EXEEXT'] exec(cmd, command_path, *ARGV) else exec(command_path, *ARGV) end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
review-3.0.0.preview3 | bin/review |
review-3.0.0.preview2 | bin/review |
review-3.0.0.preview1 | bin/review |
review-2.5.0 | bin/review |