diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2014-02-17 23:36:30 -0700 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2014-02-17 23:36:30 -0700 |
| commit | 0a27dac9855e9a651360260b19925a043c0a65ba (patch) | |
| tree | f69ef5aba2b485e8b735f8ee239a3bdd68f92db5 /bin | |
| parent | d100d34e200ed0540ad108d79ecb19962ae607b0 (diff) | |
cleanup the cli script, force GC run after loading Asciidoctor
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/asciidoctor | 11 | ||||
| -rwxr-xr-x | bin/asciidoctor-safe | 10 |
2 files changed, 9 insertions, 12 deletions
diff --git a/bin/asciidoctor b/bin/asciidoctor index 5674def5..cc052268 100755 --- a/bin/asciidoctor +++ b/bin/asciidoctor @@ -1,14 +1,13 @@ #!/usr/bin/env ruby -$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') +require 'rubygems' if RUBY_VERSION < '1.9' -if RUBY_VERSION < '1.9' - require 'rubygems' -end -require 'asciidoctor' +require File.join File.dirname(__FILE__), '../lib/asciidoctor' +require 'optparse' require 'asciidoctor/cli/options' require 'asciidoctor/cli/invoker' -invoker = Asciidoctor::Cli::Invoker.new(ARGV) +invoker = Asciidoctor::Cli::Invoker.new ARGV +GC.start invoker.invoke! exit invoker.code diff --git a/bin/asciidoctor-safe b/bin/asciidoctor-safe index 8b971f77..0810ceda 100755 --- a/bin/asciidoctor-safe +++ b/bin/asciidoctor-safe @@ -1,16 +1,14 @@ #!/usr/bin/env ruby -$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') +require 'rubygems' if RUBY_VERSION < '1.9' -if RUBY_VERSION < '1.9' - require 'rubygems' -end -require 'asciidoctor' +require File.join File.dirname(__FILE__), '../lib/asciidoctor' +require 'optparse' require 'asciidoctor/cli/options' require 'asciidoctor/cli/invoker' options = Asciidoctor::Cli::Options.parse! ARGV options[:safe] = Asciidoctor::SafeMode::SAFE -invoker = Asciidoctor::Cli::Invoker.new(options) +invoker = Asciidoctor::Cli::Invoker.new options invoker.invoke! exit invoker.code |
