#!/usr/bin/env ruby require 'rubygems' if ARGV[0] == 'help' require 'jbundler/cli' JBundler::Cli.start else ARGV << 'install' if ARGV.size == 0 if ARGV[0] == 'console' require 'irb' require 'jbundler/lazy' include JBundler::Lazy end begin load Gem.bin_path('bundler', 'bundle') rescue Exception if ARGV[0] == 'console' ARGV.shift require 'jbundler' if defined? JBUNDLER_CLASSPATH warn 'Jarfile dependencies loaded' else warn 'Could not locate Jarfile' end IRB.start end end if ARGV[0] && ['install', 'update', 'show'].member?(ARGV[0]) require 'jbundler/cli' JBundler::Cli.start end end