rf-web/vendor/bundle/gems/rouge-3.12.0/bin/rougify

19 lines
429 B
Plaintext
Raw Normal View History

2019-10-21 08:18:17 +00:00
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'pathname'
ROOT_DIR = Pathname.new(__FILE__).dirname.parent
load ROOT_DIR.join('lib/rouge.rb')
load ROOT_DIR.join('lib/rouge/cli.rb')
Signal.trap('PIPE', 'SYSTEM_DEFAULT') if Signal.list.include? 'PIPE'
begin
Rouge::CLI.parse(ARGV).run
rescue Rouge::CLI::Error => e
puts e.message
exit e.status
rescue Interrupt
$stderr.puts "\nrouge: interrupted"
exit 2
end