mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 01:17:42 -04:00
Added files in nix folder to all posix systems.
This commit is contained in:
parent
1b5a7ebf74
commit
6483146fc7
1 changed files with 10 additions and 7 deletions
17
bin/dots.rb
17
bin/dots.rb
|
|
@ -13,7 +13,15 @@ prompt = TTY::Prompt.new(help_color: :magenta)
|
|||
@files_copy = Dir.glob("#{@dotroot}/copy/*")
|
||||
@files_link = Dir.glob("#{@dotroot}/link/*")
|
||||
|
||||
if OS.mac?
|
||||
if OS.posix?
|
||||
@files_copy.concat Dir.glob("#{@dotroot}/copy/nix/*")
|
||||
@files_link.concat Dir.glob("#{@dotroot}/link/nix/*")
|
||||
end
|
||||
|
||||
if OS.windows?
|
||||
puts 'It seems you are on Windows'
|
||||
|
||||
elsif OS.mac?
|
||||
stdout, _stderr, _status = Open3.capture3('sw_vers -productVersion')
|
||||
if Integer(stdout.strip.split('.')[0]) == 10
|
||||
if Integer(stdout.strip.split('.')[1]) >= 12
|
||||
|
|
@ -34,14 +42,9 @@ if OS.mac?
|
|||
|
||||
elsif OS.liux?
|
||||
puts 'It seems you are on Linux'
|
||||
@files_copy.concat Dir.glob("#{@dotroot}/copy/nix/*")
|
||||
@files_link.concat Dir.glob("#{@dotroot}/link/nix/*")
|
||||
|
||||
elsif OS.windows?
|
||||
puts 'It seems you are on Windows'
|
||||
|
||||
else
|
||||
abort("I'm not sure what to do with this OS...")
|
||||
abort("I'm not sure what to do with this OS...") unless OS.posix?
|
||||
end
|
||||
|
||||
task = prompt.select('What would you like to do?', %w[copy link install])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue