use ruby for legacy binaries because Rubygems wraps everything in rubygems regardless of language

This commit is contained in:
Thomas Reynolds 2011-07-31 20:12:12 -07:00
parent d7e519dc85
commit ca2666cbab
3 changed files with 27 additions and 6 deletions

View file

@ -1,2 +1,9 @@
#!/bin/bash
/usr/bin/env middleman build $@
#!/usr/bin/env ruby
require "rubygems"
libdir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
require 'middleman'
args = ARGV.dup.unshift("build")
Middleman::CLI.start(args)

View file

@ -1,2 +1,9 @@
#!/bin/bash
/usr/bin/env middleman init $@
#!/usr/bin/env ruby
require "rubygems"
libdir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
require 'middleman'
args = ARGV.dup.unshift("init")
Middleman::CLI.start(args)

View file

@ -1,2 +1,9 @@
#!/bin/bash
/usr/bin/env middleman server $@
#!/usr/bin/env ruby
require "rubygems"
libdir = File.join(File.dirname(File.dirname(__FILE__)), "lib")
$LOAD_PATH.unshift(libdir) unless $LOAD_PATH.include?(libdir)
require 'middleman'
args = ARGV.dup.unshift("server")
Middleman::CLI.start(args)