From 6483146fc71dc3103354362cbf2ecb6308428ad1 Mon Sep 17 00:00:00 2001 From: Gene Liverman Date: Mon, 8 May 2017 22:09:27 -0700 Subject: [PATCH] Added files in nix folder to all posix systems. --- bin/dots.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/dots.rb b/bin/dots.rb index 95d22d9..bd7d7f0 100755 --- a/bin/dots.rb +++ b/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])