Add ARGV.git?
This commit is contained in:
parent
34c0b40abf
commit
3c9cc18c17
@ -115,7 +115,7 @@ class Build
|
||||
end
|
||||
|
||||
formula.brew do
|
||||
if ARGV.flag? '--git'
|
||||
if ARGV.git?
|
||||
system "git", "init"
|
||||
system "git", "add", "-A"
|
||||
end
|
||||
@ -124,7 +124,7 @@ class Build
|
||||
puts "Type `exit' to return and finalize the installation"
|
||||
puts "Install to this prefix: #{formula.prefix}"
|
||||
|
||||
if ARGV.flag? '--git'
|
||||
if ARGV.git?
|
||||
puts "This directory is now a git repo. Make your changes and then use:"
|
||||
puts " git diff | pbcopy"
|
||||
puts "to copy the diff to the clipboard."
|
||||
|
||||
@ -125,7 +125,7 @@ module Homebrew
|
||||
fi.build_from_source = ARGV.build_from_source?
|
||||
fi.force_bottle = ARGV.force_bottle?
|
||||
fi.interactive = ARGV.interactive?
|
||||
fi.interactive &&= :git if ARGV.flag? "--git"
|
||||
fi.interactive &&= :git if ARGV.git?
|
||||
fi.verbose = ARGV.verbose?
|
||||
fi.verbose &&= :quieter if ARGV.quieter?
|
||||
fi.debug = ARGV.debug?
|
||||
|
||||
@ -36,7 +36,7 @@ module Homebrew
|
||||
f.brew { cp_r getwd, stage_dir }
|
||||
ENV['VERBOSE'] = nil
|
||||
|
||||
if ARGV.flag? "--git"
|
||||
if ARGV.git?
|
||||
ohai "Setting up git repository"
|
||||
cd stage_dir
|
||||
system "git", "init", "-q"
|
||||
|
||||
@ -86,6 +86,10 @@ module HomebrewArgvExtension
|
||||
include?('--dry-run') || switch?('n')
|
||||
end
|
||||
|
||||
def git?
|
||||
flag? "--git"
|
||||
end
|
||||
|
||||
def homebrew_developer?
|
||||
include? '--homebrew-developer' or !ENV['HOMEBREW_DEVELOPER'].nil?
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user