class Object
Public Instance Methods
addBrew()
click to toggle source
Define methods
# File bin/ezbash, line 5 def addBrew() if `which brew` == '' puts 'You appear to be running MacOS without Homebrew installed.' puts "If you don\'t know what Homebrew is, visit 'brew.sh' or just hit enter. If you do and would like to install it, type 'yes'. >> " userReply = gets.chomp userReply.downcase! if userReply == 'yes' Kernel.system "ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'" else puts "That\'s fine! Just keep in mind, the install, uninstall, and search commands won\'t work for you." end end end
installDeb(package)
click to toggle source
# File bin/ezbash, line 19 def installDeb(package) Kernel.system "sudo apt-get install #{package}" puts "\r" puts "I ran: 'sudo apt-get install #{package}'" end
installHb(package)
click to toggle source
# File bin/ezbash, line 29 def installHb(package) Kernel.system "brew install #{package}" puts "\r" puts "I ran: 'brew install #{package}'" end
installPac(package)
click to toggle source
# File bin/ezbash, line 34 def installPac(package) Kernel.system "sudo pacman -S #{package}" puts "\r" puts "I ran: 'sudo pacman -S #{package}'" end
installRpm(package)
click to toggle source
# File bin/ezbash, line 24 def installRpm(package) Kernel.system "sudo yum install #{package}" puts "\r" puts "I ran: 'sudo yum install #{package}'" end
searchDeb(package)
click to toggle source
# File bin/ezbash, line 59 def searchDeb(package) Kernel.system "apt-cache search #{package}" puts "\r" puts "I ran: 'apt-cache search #{package}'" end
searchHb(package)
click to toggle source
# File bin/ezbash, line 69 def searchHb(package) Kernel.system "brew search #{package}" puts "\r" puts "I ran: 'brew search #{package}'" end
searchPac(package)
click to toggle source
# File bin/ezbash, line 74 def searchPac(package) Kernel.system "sudo pacman -Ss #{package}" puts "\r" puts "I ran: 'sudo pacman -Ss #{package}'" end
searchRpm(package)
click to toggle source
# File bin/ezbash, line 64 def searchRpm(package) Kernel.system "yum search #{package}" puts "\r" puts "I ran: 'yum search #{package}'" end
uninstallDeb(package)
click to toggle source
# File bin/ezbash, line 39 def uninstallDeb(package) Kernel.system "sudo apt-get remove #{package}" puts "\r" puts "I ran: 'sudo apt-get remove #{package}'" end
uninstallHb(package)
click to toggle source
# File bin/ezbash, line 49 def uninstallHb(package) Kernel.system "brew uninstall #{package}" puts "\r" puts "I ran: 'brew uninstall #{package}'" end
uninstallPac(package)
click to toggle source
# File bin/ezbash, line 54 def uninstallPac(package) Kernel.system "sudo pacman -R #{package}" puts "\r" puts "I ran: 'sudo pacman -R #{package}'" end
uninstallRpm(package)
click to toggle source
# File bin/ezbash, line 44 def uninstallRpm(package) Kernel.system "sudo yum uninstall #{package}" puts "\r" puts "I ran: 'sudo yum uninstall #{package}'" end