brendan.mcdevitt.tech/vendor/bundle/ruby/2.6.0/gems/rouge-3.3.0/bin/rougify
2019-04-30 01:38:19 -05:00

18 lines
429 B
Ruby
Executable file

#!/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