module BinInstall::Zsh::OhMyZsh

Constants

INSTALL

Public Class Methods

continue?() click to toggle source
# File lib/bin_install/zsh/oh_my_zsh.rb, line 38
def self.continue?
  return true if installed?
  print 'Would you like to continue? [Y/n]: '
  Shell.default_yes?(gets.chomp)
end
install() click to toggle source
# File lib/bin_install/zsh/oh_my_zsh.rb, line 9
def self.install
  puts 'Installing Oh My Zsh...'.white
  print_reload_warning
  if continue?
    system(INSTALL)
  else
    abort('Oh My Zsh installation aborted by user.'.red)
  end
end
install!() click to toggle source
# File lib/bin_install/zsh/oh_my_zsh.rb, line 19
def self.install!
  puts 'Installing Oh My Zsh...'.white
  print_reload_warning
  if continue?
    BinInstall.system!(INSTALL)
  else
    abort('Oh My Zsh installation aborted by user.'.red)
  end
end
installed?() click to toggle source
# File lib/bin_install/zsh/oh_my_zsh.rb, line 44
def self.installed?
  File.exist?(File.expand_path('~/.oh-my-zsh'))
end
print_reload_warning() click to toggle source
require!() click to toggle source
# File lib/bin_install/zsh/oh_my_zsh.rb, line 5
def self.require!
  abort('Oh My Zsh is required. Visit http://ohmyz.sh/ to install.'.red) unless installed?
end