Sha256: 724105bcc904be20f3037bf42810ec11fe7ac1d0cc986989fbfb69cdfb1200d7
Contents?: true
Size: 506 Bytes
Versions: 1
Compression:
Stored size: 506 Bytes
Contents
class Git def self.klone(git_location) # clone_repository(git_location) end def self.folder_name(git_location) folder_name = git_location.scan(/[^:]+[\/]?dotfile[s?]{1}/).first.gsub('/', '_') end def self.clone_repository(git_location) if (File.directory?("#{ENV['HOME']}/.dotman/#{folder_name(git_location)}")) STDOUT.puts("Dotfiles were already cloned") else system "git clone #{git_location} #{ENV['HOME']}/.dotman/#{folder_name(git_location)}" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dotman-0.0.1 | lib/git.rb |