Class: Chid::Commands::Installs::Dotfile

Inherits:
Chid::Command show all
Defined in:
lib/chid/commands/installs/dotfile.rb

Constant Summary

Constants inherited from Chid::Command

Chid::Command::COMMANDS

Instance Attribute Summary

Attributes inherited from Chid::Command

#options

Instance Method Summary collapse

Methods inherited from Chid::Command

command, help, #initialize, map_options_with_values, run

Constructor Details

This class inherits a constructor from Chid::Command

Instance Method Details

#runObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# File 'lib/chid/commands/installs/dotfile.rb', line 22

def run
  puts "\nInstalling the YADR Dotfiles..."
  ::ChidConfig.on_linux do
    system('sudo apt-get update')
    system('sudo apt-get install curl')
    system('sudo apt-get install zsh')
    system('sudo apt-get install git-core')
  end

  system('sh -c "`curl -fsSL https://raw.githubusercontent.com/skwp/dotfiles/master/install.sh`"')

  puts 'Updating YARD...'
  home_path = File.expand_path("~/")
  path = "#{home_path}/.yadr"
  Dir.chdir path
  system('git pull --rebase')
  system('rake update')

  puts "\nYARD Dotfiles installed successfully"
end