Skip to content

Commit

Permalink
updated bin
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrizor committed Mar 8, 2014
1 parent 7764b01 commit 316552b
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions bin/bule
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
#!/usr/bin/env ruby
require 'turbulence'
require 'turbulence/checks_environment'
#!/usr/bin/env ruby_executable_hooks
#
# This file was generated by RubyGems.
#
# The application 'turbulence' is installed as part of a gem, and
# this file is here to facilitate running it.
#

cli = Turbulence::CommandLineInterface.new(ARGV)
require 'rubygems'

unless Turbulence::ChecksEnvironment.scm_repo?(Dir.pwd)
STDERR.puts "Turbulence could not calculate metrics, as we could not find a repository in the current directory."
STDERR.puts "Please run bule from inside a repository."
exit
version = ">= 0"

if ARGV.first
str = ARGV.first
str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
if str =~ /\A_(.*)_\z/
version = $1
ARGV.shift
end
end

cli.generate_bundle
cli.open_bundle
gem 'turbulence', version
load Gem.bin_path('turbulence', 'bule', version)

0 comments on commit 316552b

Please sign in to comment.