summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorSimone Bortolin <simonebortolin@users.noreply.github.com>2022-08-04 15:30:40 +0200
committerSimone Bortolin <simonebortolin@users.noreply.github.com>2022-12-19 22:48:05 +0100
commit0df87a53ed7f7620b0ae7f5b0859427a93b1d1ad (patch)
tree52306d80b5cf0ae4e8b463e9401cdad51c84a558 /bin
downloadhack-gpon.github.io-0df87a53ed7f7620b0ae7f5b0859427a93b1d1ad.tar
hack-gpon.github.io-0df87a53ed7f7620b0ae7f5b0859427a93b1d1ad.tar.gz
hack-gpon.github.io-0df87a53ed7f7620b0ae7f5b0859427a93b1d1ad.tar.bz2
hack-gpon.github.io-0df87a53ed7f7620b0ae7f5b0859427a93b1d1ad.tar.lz
hack-gpon.github.io-0df87a53ed7f7620b0ae7f5b0859427a93b1d1ad.tar.xz
hack-gpon.github.io-0df87a53ed7f7620b0ae7f5b0859427a93b1d1ad.tar.zst
hack-gpon.github.io-0df87a53ed7f7620b0ae7f5b0859427a93b1d1ad.zip
Diffstat (limited to 'bin')
-rw-r--r--bin/just-the-docs16
1 files changed, 16 insertions, 0 deletions
diff --git a/bin/just-the-docs b/bin/just-the-docs
new file mode 100644
index 0000000..858365b
--- /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 \ No newline at end of file