summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-08-18 11:58:05 -0700
committerelijah <elijah@riseup.net>2015-08-18 11:58:05 -0700
commited604349a4035eed2bccefa9aa030d93ad4f6b58 (patch)
tree333a6c5335f25935be13c1ffed82b8cc7c293df8 /bin
parentcde4ae067e034e3969629f4d8da4f46daae3c351 (diff)
moved commands to leap_platform
Diffstat (limited to 'bin')
-rwxr-xr-xbin/leap18
1 files changed, 5 insertions, 13 deletions
diff --git a/bin/leap b/bin/leap
index 8da9356..3bb8975 100755
--- a/bin/leap
+++ b/bin/leap
@@ -15,7 +15,6 @@ else
end
LEAP_CLI_BASE_DIR = File.expand_path('..', File.dirname(File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__))
-ORIGINAL_ARGV = ARGV.dup
begin
# First, try to load the leap_cli code that is local to this `leap` command.
@@ -74,17 +73,13 @@ module LeapCli::Commands
program_desc LeapCli::SUMMARY
program_long_desc LeapCli::DESCRIPTION
+ LeapCli::Bootstrap::setup(ARGV)
+
# handle --version ourselves (and not GLI)
if ARGV.grep(/--version/).any?
- puts "leap #{LeapCli::VERSION}, ruby #{RUBY_VERSION}"
- begin
- commands_from('leap_cli/commands')
- initialize_leap_cli(false, {:verbose => 2})
- rescue StandardError => exc
- puts exc.to_s
- raise exc if DEBUG
- end
- exit(0)
+ LeapCli::Bootstrap::handle_version(self)
+ else
+ LeapCli::Bootstrap::load_libraries(self)
end
# disable GLI error catching
@@ -92,9 +87,6 @@ module LeapCli::Commands
def error_message(msg)
end
- # load commands
- commands_from('leap_cli/commands')
-
# run command
begin
exit_status = run(ARGV)