Class: Vfs::File

Inherits:
Object
  • Object
show all
Defined in:
lib/vos/helpers/ubuntu.rb

Instance Method Summary collapse

Instance Method Details

#append_to_environment_of(box, reload = true) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/vos/helpers/ubuntu.rb', line 63

def append_to_environment_of box, reload = true
  raise "#{box} must be an Vos::Box" unless box.is_a? Vos::Box

  remote_file = box.dir('/etc/profile_ext').file(name)
  copy_to! remote_file

  require_clause = "\n# \#{name}\nsource \#{remote_file.path}\n  BASH\n\n  box.env_file.append require_clause unless box.env_file.content.include? require_clause\n\n  box.reload_env if reload\nend\n"