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"