Sha256: cba34e7f3c359968768b94bf1867df05232a672892b6bd6d334a67063e9e8b46
Contents?: true
Size: 847 Bytes
Versions: 12
Compression:
Stored size: 847 Bytes
Contents
require 'dply/constants' require 'dply/pkgs' require 'dply/helper' module Dply module Cli class InstallPkgs include Helper def initialize(argv) @argv = argv @options = {} end def run opts.parse!(@argv) path = Constants::PKGS_YML error "#{path} cannot be a symlink" if File.symlink? path pkgs = Pkgs.new(path) pkgs.install(build_mode: @options[:build_mode]) puts "installed" end def opts OptionParser.new do |opts| opts.banner = "Usage: drake install-pkgs [options] [target]" opts.on("-b" , "Build mode") do |b| @options[:build_mode] = true end opts.on("-h", "--help", "Help") do puts opts exit end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems