38 lines
875 B
Ruby
Raw Normal View History

2020-11-25 17:03:23 +01:00
# typed: true
# frozen_string_literal: true
require "formula"
2019-04-17 18:25:08 +09:00
require "cli/parser"
module Homebrew
2020-10-20 12:03:48 +02:00
extend T::Sig
2016-09-26 01:44:51 +02:00
module_function
2020-10-20 12:03:48 +02:00
sig { returns(CLI::Parser) }
2018-10-27 22:59:08 +05:30
def diy_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`diy` [<options>]
Automatically determine the installation prefix for non-Homebrew software.
Using the output from this command, you can install your own software into
the Cellar and then link it into Homebrew's prefix with `brew link`.
EOS
2019-08-06 13:23:19 -04:00
flag "--name=",
description: "Explicitly set the <name> of the package being installed."
2019-08-06 13:23:19 -04:00
flag "--version=",
description: "Explicitly set the <version> of the package being installed."
2020-07-30 18:40:10 +02:00
max_named 0
hide_from_man_page!
2018-10-27 22:59:08 +05:30
end
end
def diy
diy_args.parse
2018-10-27 22:59:08 +05:30
odisabled "`brew diy`"
end
end