Module: Dots::Bootstrap
Instance Method Summary collapse
-
#install_configuration ⇒ Object
Install configuration file templates that for one reason or another we can’t include in the repo directly.
-
#install_packages ⇒ Object
When Homebrew is installed, use it to install Python and Ruby, then install necessary packages for Python and Ruby.
-
#install_programs ⇒ Object
Install C binaries, Python programs, and other useful tools from Homebrew.
Instance Method Details
#install_configuration ⇒ Object
Install configuration file templates that for one reason or another we can’t include in the repo directly. Usually due to exposed passwords or API keys.
30 31 32 |
# File 'lib/ruby/dots/bootstrap.rb', line 30 def install_configuration system "mkdir -p ~/.irssi && cp -R ~/.dots/etc/irssi/** ~/.irssi" end |
#install_packages ⇒ Object
When Homebrew is installed, use it to install Python and Ruby, then install necessary packages for Python and Ruby.
23 24 25 |
# File 'lib/ruby/dots/bootstrap.rb', line 23 def install_packages %w(system python ruby).each { |l| send "install_#{l}_packages" } end |
#install_programs ⇒ Object
Install C binaries, Python programs, and other useful tools from Homebrew. Install Homebrew if it isn’t already installed, then recursively call this method to install packages.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/ruby/dots/bootstrap.rb', line 10 def install_programs if installed? "brew" install_packages and install_configuration elsif @homebrew.present? # make sure we're not in an infinite loop puts "WARNING: Homebrew can not install. Exiting.." and exit(1) else @homebrew = true # used when the if statement fails twice install_homebrew and install_programs end end |