#!/usr/bin/env ruby # Disable stdout,stderr buffering STDERR.sync = STDOUT.sync = true # Set the process name before we go to far in $PROGRAM_NAME = 'buildbox' # Add the buildbox lib directory to the load path root_dir = File.expand_path(File.join(File.dirname(__FILE__), '..')) lib_dir = File.join(root_dir, 'lib') $LOAD_PATH.unshift(lib_dir) unless $LOAD_PATH.include?(lib_dir) # Setup bundler correctly ENV['BUNDLE_GEMFILE'] ||= File.join(root_dir, "Gemfile") require 'bundler/setup' require 'buildbox' Buildbox.logger.level = Logger::DEBUG if ENV['DEBUG'] == 'true' Buildbox::CLI.new(ARGV).parse