From ca2666cbabf9603a6fc5054c44e23814a22ae295 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Sun, 31 Jul 2011 20:12:12 -0700 Subject: [PATCH] use ruby for legacy binaries because Rubygems wraps everything in rubygems regardless of language --- bin/mm-build | 11 +++++++++-- bin/mm-init | 11 +++++++++-- bin/mm-server | 11 +++++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/bin/mm-build b/bin/mm-build index 9d42ea39..bcf35725 100755 --- a/bin/mm-build +++ b/bin/mm-build @@ -1,2 +1,9 @@ -#!/bin/bash -/usr/bin/env middleman build $@ \ No newline at end of file +#!/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) \ No newline at end of file diff --git a/bin/mm-init b/bin/mm-init index 91e43cbc..ce2f7593 100755 --- a/bin/mm-init +++ b/bin/mm-init @@ -1,2 +1,9 @@ -#!/bin/bash -/usr/bin/env middleman init $@ \ No newline at end of file +#!/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) \ No newline at end of file diff --git a/bin/mm-server b/bin/mm-server index 72e4df1e..0095e70a 100755 --- a/bin/mm-server +++ b/bin/mm-server @@ -1,2 +1,9 @@ -#!/bin/bash -/usr/bin/env middleman server $@ \ No newline at end of file +#!/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) \ No newline at end of file