class BashImportBox

Public Instance Methods

custom_install_steps() click to toggle source
# File lib/pandoras_box/boxes/bash_import_box.rb, line 15
def custom_install_steps
  FileManager.generate_from_array(['zsh/modules/'])
  %w(bashrc bash_profile).each do |file|
    puts "Copying #{file} to modules"
    dest = "#{ENV['HOME']}/.pandorasbox/zsh/modules/#{file}.zsh"
    FileUtils.mkpath(File.dirname(dest))
    FileUtils.copy("#{ENV['HOME']}/.#{file}", dest)
  end
  `chsh -s /bin/zsh`
end
pre_steps() click to toggle source
# File lib/pandoras_box/boxes/bash_import_box.rb, line 9
def pre_steps
  unless system('zsh --version')
    abort('ZSH is not installed! Install it!')
  end
end