Class: BashImportBox
- Defined in:
- lib/pandoras_box/boxes/bash_import_box.rb
Constant Summary collapse
- @@name =
'default_bash2zsh'
- @@description =
'Bash -> zsh'
- @@download_repo =
'hunterboerner/Boxes'
Instance Attribute Summary
Attributes inherited from Box
#description, #download_directory, #download_repo, #name
Instance Method Summary collapse
Methods inherited from Box
Constructor Details
This class inherits a constructor from Box
Instance Method Details
#custom_install_steps ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# 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 ⇒ Object
9 10 11 12 13 |
# 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 |