Sha256: 9ee94d2af577927f228b9eb1f057085200d3d4af542e5d4dc179c26441ede390
Contents?: true
Size: 998 Bytes
Versions: 5
Compression:
Stored size: 998 Bytes
Contents
#!/usr/bin/env ruby if File.exist?(asciidoctor_htmlbook = (File.expand_path '../../lib/asciidoctor-htmlbook', __FILE__)) require asciidoctor_htmlbook else require 'asciidoctor-htmlbook' end require 'asciidoctor/cli' options = Asciidoctor::Cli::Options.new backend: 'htmlbook', header_footer: true # FIXME provide an API in Asciidoctor for sub-components to print version information unless ARGV != ['-v'] && (ARGV & ['-V', '--version']).empty? $stdout.write %(Asciidoctor HTMLbook #{Asciidoctor::Htmlbook::VERSION} using ) # NOTE the print_version method was added in Asciidoctor 1.5.2 if options.respond_to? :print_version options.print_version else puts %(Asciidoctor #{::Asciidoctor::VERSION} [http://asciidoctor.org]) end exit 0 end # FIXME This is a really bizarre API. Please make me simpler. case (result = options.parse! ARGV) when Integer exit result else invoker = Asciidoctor::Cli::Invoker.new options GC.start invoker.invoke! exit invoker.code end
Version data entries
5 entries across 5 versions & 1 rubygems