Sha256: 3c9be674e21a30f1d23dd65a70b0a99b1e8932ae6546a5dd6079c1bd7c2c2f5b
Contents?: true
Size: 1.61 KB
Versions: 10
Compression:
Stored size: 1.61 KB
Contents
module BinInstall module Brew module Package def self.install(package) system("brew install #{package}") end def self.install!(package) BinInstall.system!("brew install #{package}") end def self.uninstall(package) system("brew uninstall #{package}") end def self.uninstall!(package) BinInstall.system!("brew uninstall #{package}") end def self.upgrade(package) if latest_version?(package) puts "#{package} is already the latest version. Skipping #{package} install.".blue else system("brew upgrade #{package}") end end def self.upgrade!(package) if latest_version?(package) puts "#{package} is already the latest version. Skipping #{package} install.".blue else BinInstall.system!("brew upgrade #{package}") end end def self.install_or_upgrade(package) if installed?(package) upgrade(package) else install(package) end end def self.install_or_upgrade!(package) if installed?(package) upgrade!(package) else install!(package) end end def self.link(package) system("brew link #{package} --force") end def self.link!(package) BinInstall.system!("brew link #{package} --force") end def self.installed?(package) system("brew list --versions #{package}") end def self.latest_version?(package) system("brew outdated #{package}") end end end end
Version data entries
10 entries across 10 versions & 1 rubygems