rf-web/vendor/bundle/gems/rouge-3.12.0/bin/rougify
2019-10-21 10:18:17 +02:00

19 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