From 9f1b573a9989dc1f405572d86f2c451e51e9e839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Pr=C3=A9vost?= Date: Sat, 5 Feb 2011 16:38:07 -0500 Subject: [PATCH] =?UTF-8?q?Add=20=E2=80=9Clib=E2=80=9D=20to=20$:=20in=20bi?= =?UTF-8?q?n/teamocil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/teamocil | 5 ++++- lib/teamocil.rb | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/bin/teamocil b/bin/teamocil index 9bf3c9a..6e42556 100755 --- a/bin/teamocil +++ b/bin/teamocil @@ -1,6 +1,9 @@ #!/usr/bin/env ruby -require File.dirname(__FILE__)+"/../lib/teamocil" +$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib]) + +require 'yaml' +require 'teamocil' if ENV["TMUX"] == nil puts "You must be in a tmux session to use teamocil" diff --git a/lib/teamocil.rb b/lib/teamocil.rb index cbb66f1..72c6616 100644 --- a/lib/teamocil.rb +++ b/lib/teamocil.rb @@ -1,8 +1,3 @@ -require 'yaml' - -$:.unshift(File.dirname(__FILE__)) unless - $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) - module Teamocil VERSION = '0.1.2' autoload :Layout, "teamocil/layout"