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



38
39
40
41
42
43
44
45
46
47
# File 'lib/vos/helpers/ubuntu.rb', line 38

def append_to_environment_of box, reload = true
  raise "#{box} must be an Vos::Box" unless file.is_a? Vos::Box        
  
  copy_to! box.dir('/etc/profile_ext').file(name)

  require_clause = "source #{remote_file.path}"
  box.env_file.append "\n#{require_clause}\n" unless env_file.content.include? require_clause
  
  box.reload_env if reload
end