From 42c283fb3ba7906c2c8d214dead0f62b54d26b76 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill Date: Fri, 9 Jun 2017 10:15:15 -0400 Subject: [PATCH] Add binary --- bin/just-the-docs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 bin/just-the-docs diff --git a/bin/just-the-docs b/bin/just-the-docs new file mode 100755 index 0000000..6404b21 --- /dev/null +++ b/bin/just-the-docs @@ -0,0 +1,16 @@ +#!/usr/bin/env ruby + +gem_dir = File.expand_path("..",File.dirname(__FILE__)) +$LOAD_PATH.unshift gem_dir# Look in gem directory for resources first. +exec_type = ARGV[0] + +if exec_type == 'rake' then + require 'rake' + require 'pp' + pwd=Dir.pwd + Dir.chdir(gem_dir) # We'll load rakefile from the gem's dir. + Rake.application.init + Rake.application.load_rakefile + Dir.chdir(pwd) # Revert to original pwd for any path args passed to task. + Rake.application.invoke_task(ARGV[1]) +end