Sha256: 9eeedf2092dcd1c2abd22b091039e7f6222420a537e4178c1249a7aba9f90e02
Contents?: true
Size: 825 Bytes
Versions: 12
Compression:
Stored size: 825 Bytes
Contents
module BinInstall module Git def self.install puts 'Installing Git...'.white Brew::Package.install_or_upgrade('git') end def self.install! puts 'Installing Git...'.white Brew::Package.install_or_upgrade!('git') end def self.add_remote(name, url) if remote?(name) puts "Remote #{name} already exists. Skipping.".blue else system("git remote add #{name} #{url}") end end def self.add_remote!(name, url) if remote?(name) puts "Remote #{name} already exists. Skipping.".blue else BinInstall.system!("git remote add #{name} #{url}") end end def self.remote?(name) system("git remote get-url #{name}") end def self.installed? Shell.executable_exists?('git') end end end
Version data entries
12 entries across 12 versions & 1 rubygems