mirror of
https://github.com/genebean/dots.git
synced 2026-03-27 09:27:44 -04:00
Move ruby testing to GH Actions & fix linting
This commit is contained in:
parent
b6c4139be4
commit
d2efca732c
7 changed files with 29 additions and 30 deletions
|
|
@ -5,7 +5,7 @@ require 'os'
|
|||
require 'tty-command'
|
||||
require 'tty-file'
|
||||
require 'tty-prompt'
|
||||
require_relative 'dotutils.rb'
|
||||
require_relative 'dotutils'
|
||||
|
||||
cmd = TTY::Command.new
|
||||
@prompt = TTY::Prompt.new(help_color: :magenta)
|
||||
|
|
|
|||
|
|
@ -19,10 +19,11 @@ end
|
|||
def rename_file(source, destination, action)
|
||||
puts "#{destination} exists, renaming to #{destination}.predots"
|
||||
File.rename(destination, "#{destination}.predots")
|
||||
if action.eql?('link')
|
||||
case action
|
||||
when 'link'
|
||||
puts "Linking #{destination} to #{source}"
|
||||
File.symlink(source, destination)
|
||||
elsif action.eql?('copy')
|
||||
when 'copy'
|
||||
puts "Copying #{destination} to #{source}"
|
||||
FileUtils.cp_r(source, destination)
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue