Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Commit

Permalink
Updated how we activate bundler.
Browse files Browse the repository at this point in the history
  • Loading branch information
postmodern committed Apr 5, 2013
1 parent f8add85 commit 0a2c7f8
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions bin/ronin-irc
Expand Up @@ -2,24 +2,19 @@

require 'rubygems'

root_dir = File.expand_path(File.join(File.dirname(__FILE__),'..'))
if File.directory?(File.join(root_dir,'.git'))
Dir.chdir(root_dir) do |path|
require 'bundler'

root = File.expand_path(File.join(File.dirname(__FILE__),'..'))
if File.directory?(File.join(root,'.git'))
Dir.chdir(root) do
begin
Bundler.setup(:default)
rescue Bundler::BundlerError => e
require 'bundler/setup'
rescue LoadError => e
warn e.message
warn "Run `bundle install` to install missing gems"
exit e.status_code
warn "Run `gem install bundler` to install Bundler"
exit -1
end
end
end

lib_dir = File.join(root_dir,'lib')
$LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)

require 'ronin/ui/cli/commands/irc'

Ronin::UI::CLI::Commands::Irc.start

0 comments on commit 0a2c7f8

Please sign in to comment.