Class: Rebuild::Script

Inherits:
Object
  • Object
show all
Defined in:
lib/rebuild/script.rb

Class Method Summary collapse

Class Method Details

.execute_exp(name, sudo: false) ⇒ Object



11
12
13
14
# File 'lib/rebuild/script.rb', line 11

def execute_exp(name, sudo: false)
  script_path = File.join(script_dir, "#{name}.exp")
  `#{'sudo' if sudo} expect -f #{script_path}`
end

.execute_scpt(name) ⇒ Object



6
7
8
9
# File 'lib/rebuild/script.rb', line 6

def execute_scpt(name)
  script_path = File.join(script_dir, "#{name}.scpt")
  `sudo osascript #{script_path}`
end

.execute_sh(name) ⇒ Object



16
17
18
19
# File 'lib/rebuild/script.rb', line 16

def execute_sh(name)
  script_path = File.join(script_dir, "#{name}.sh")
  system('sh', script_path)
end