Sha256: 041e4749418b4ec34dd616c36f3f7f81f56bc49822c050a7930a27f1c69391cf

Contents?: true

Size: 731 Bytes

Versions: 1

Compression:

Stored size: 731 Bytes

Contents

module BinInstall
  module Git
    def self.install
      puts 'Installing Git...'.white
      Brew.install_or_upgrade('git')
    end

    def self.install!
      puts 'Installing Git...'.white
      Brew.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 remote?(name)
      system("git remote get-url #{name}")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bin_install-0.0.6 lib/bin_install/git.rb