-
-
Save iMichka/6ebe5c7fc94d630551cf355361b8826e to your computer and use it in GitHub Desktop.
Fast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# typed: true | |
# frozen_string_literal: true | |
require "system_command" | |
module Homebrew | |
#. module_function | |
sig { returns(CLI::Parser) } | |
def self.fast_install_args | |
Homebrew::CLI::Parser.new do | |
description <<~EOS | |
Fast Install version | |
EOS | |
named_args [:formula], min: 1, max: 1 | |
end | |
end | |
sig { void } | |
def self.fast_install | |
args = fast_install_args.parse | |
name = args.named[0] | |
p_threads = Formula[name].deps.each.map do |dep| | |
puts "Install #{dep}" | |
Process.detach(Process.spawn("#{HOMEBREW_PREFIX}/bin/brew install #{dep}")) | |
end | |
p_threads.each(&:join) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment