Sha256: d2ea86bce881e36e4358298a66d2cf14687dd6f3ec84904241a7a26a8902b540

Contents?: true

Size: 848 Bytes

Versions: 2

Compression:

Stored size: 848 Bytes

Contents

#!/usr/bin/env ruby

require 'getoptlong'
require 'devinstall'
require 'devinstall/settings'

opt =Getopt::Long.getopts(
    ['--package', '-p', Getopt::REQUIRED],
    ['--config',  '-c', Getopt::REQUIRED],
    ['--type',    '-t', Getopt::REQUIRED],
    ['--env',     '-e', Getopt::REQUIRED],
    ['--build',   '-b', ],
    ['--upload',  '-u', ],
    ['--install', '-i', ],
    ['--help',    '-h', ],
)

if opt['help']
  p('Usage: pkg-install --package|-p <package> --config|-c <config file> --build|--upload|--install')
  exit!(0)
end

Settings.load!(opt['config'])
package=Pkg.new(opt['package'])

if opt[:build]
  package.build!(opt['type'].to_sym)
end

if opt[:install]
  package.build!(opt['type'].to_sym)
  package.install!(opt['env'].to_sym)
end

if opt[:upload]
  package.build!(opt['type'].to_sym)
  package.upload!(opt['env'].to_sym)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
devinstall-0.0.2 bin/pkg-tool
devinstall-0.0.1 bin/pkg-tool