Sha256: 19438d6625177414cae46a7aba634a61dc70261f78788536c83f4a34397275d1
Contents?: true
Size: 728 Bytes
Versions: 1
Compression:
Stored size: 728 Bytes
Contents
#!/usr/bin/env ruby require 'rubygems' require 'bundler/setup' require 'devinstall/cli' unless ARGV[0] puts 'You must specify an action' exit! '' end package = [] # creata a new Array command = ARGV.shift while ARGV[0] and ARGV[0][0..1] != '--' package << ARGV.shift end if %w"version --version -v".include? command command = 'version' end if %w"help --help -h".include? command command = 'help' end unless %w"build install upload test help version".include? command puts "Unknown command #{command}" exit! 1 end ## the next should be the package # so if ARGV[0] don't start with -- # we name it package cli=Devinstall::Cli.new(*package) ## Cli can be called for multiple packages cli.send(command.to_sym)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
devinstall-1.0.1 | bin/pkg-tool |