mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
added initial section for Puppet
This commit is contained in:
parent
cfd137f95b
commit
1b5a7ebf74
1 changed files with 8 additions and 2 deletions
10
bin/dots.rb
10
bin/dots.rb
|
|
@ -4,7 +4,7 @@ require 'tty-command'
|
||||||
require 'tty-file'
|
require 'tty-file'
|
||||||
require 'tty-prompt'
|
require 'tty-prompt'
|
||||||
|
|
||||||
# cmd = TTY::Command.new
|
cmd = TTY::Command.new
|
||||||
prompt = TTY::Prompt.new(help_color: :magenta)
|
prompt = TTY::Prompt.new(help_color: :magenta)
|
||||||
|
|
||||||
@home = File.expand_path('~')
|
@home = File.expand_path('~')
|
||||||
|
|
@ -44,7 +44,7 @@ else
|
||||||
abort("I'm not sure what to do with this OS...")
|
abort("I'm not sure what to do with this OS...")
|
||||||
end
|
end
|
||||||
|
|
||||||
task = prompt.select('What would you like to do?', %w[copy link])
|
task = prompt.select('What would you like to do?', %w[copy link install])
|
||||||
case task
|
case task
|
||||||
when 'copy'
|
when 'copy'
|
||||||
if prompt.yes?('Are you sure you want to copy these files?')
|
if prompt.yes?('Are you sure you want to copy these files?')
|
||||||
|
|
@ -67,4 +67,10 @@ when 'link'
|
||||||
else
|
else
|
||||||
puts 'no linking'
|
puts 'no linking'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
when 'install'
|
||||||
|
if prompt.yes?('Are you sure you want to install your base packages?')
|
||||||
|
puts 'Here is where Puppet should be run.'
|
||||||
|
cmd.run('bundle exec puppet --version')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue