1
0
mirror of https://github.com/thangisme/notes.git synced 2024-12-22 12:06:24 -05:00
notes/bin/just-the-docs

17 lines
500 B
Plaintext
Raw Normal View History

2017-06-09 10:15:15 -04:00
#!/usr/bin/env ruby
gem_dir = File.expand_path("..",File.dirname(__FILE__))
2019-01-14 14:18:09 -05:00
$LOAD_PATH.unshift gem_dir # Look in gem directory for resources first.
2017-06-09 10:15:15 -04:00
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