Module: Install

Includes:
FileSystem, Sudo
Included in:
Core
Defined in:
lib/dotfiles/core/install.rb

Constant Summary collapse

@@etc =

/etc

'/etc/'
@@root =

~/

File.expand_path('~')+'/'
@@scripts =

~/Scripts

@@root+'Scripts/'
@@pictures =

~/Pictures

@@root+'Pictures/'
@@config =

~/.config

@@root+'.config/'

Class Method Summary collapse

Methods included from FileSystem

contents, mkdir, rglob

Methods included from Sudo

copy

Class Method Details

.config(path) ⇒ Object



42
43
44
45
# File 'lib/dotfiles/core/install.rb', line 42

def self.config(path)
  contents = FileSystem.contents(path)
  Sudo.copy(contents, @@config)
end

.etc(path) ⇒ Object



37
38
39
40
# File 'lib/dotfiles/core/install.rb', line 37

def self.etc(path)
  contents = FileSystem.contents(path)
  Sudo.copy(contents, @@etc)
end

.scripts(name, path) ⇒ Object



52
53
54
55
56
57
# File 'lib/dotfiles/core/install.rb', line 52

def self.scripts(name, path)
  contents = FileSystem.contents(path)
  scripts = FileSystem.mkdir(@@scripts+name)

  Sudo.copy(contents, scripts)
end

.tools(path) ⇒ Object



47
48
49
50
# File 'lib/dotfiles/core/install.rb', line 47

def self.tools(path)
  contents = FileSystem.contents(path)
  Sudo.copy(contents, @@root)
end

.wallpapers(name, path) ⇒ Object



59
60
61
62
63
64
# File 'lib/dotfiles/core/install.rb', line 59

def self.wallpapers(name, path)
  contents = FileSystem.contents(path)
  pictures = FileSystem.mkdir(@@pictures+name)

  Sudo.copy(contents, pictures)
end