diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2016-01-05 02:04:10 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2016-01-05 02:04:10 -0700 |
| commit | 83e69bdb9663a6933db512595d36a477d986f6d0 (patch) | |
| tree | 12797f9fb2104245561c432f9bbe3bef878b4b7d | |
| parent | a5545ae3646b714c10ea23d008a9c8786f5b2d25 (diff) | |
use failproof relative require logic in bin script
| -rwxr-xr-x | bin/asciidoctor-pdf | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/asciidoctor-pdf b/bin/asciidoctor-pdf index 083860bc..6649aaf7 100755 --- a/bin/asciidoctor-pdf +++ b/bin/asciidoctor-pdf @@ -1,6 +1,10 @@ #!/usr/bin/env ruby -require_relative '../lib/asciidoctor-pdf' +if File.exist?(asciidoctor_pdf = (File.expand_path '../../lib/asciidoctor-pdf', __FILE__)) + require asciidoctor_pdf +else + require 'asciidoctor-pdf' +end require 'asciidoctor/cli' options = Asciidoctor::Cli::Options.new backend: 'pdf', header_footer: true |
