Class: Rebuild::CommandLineTools

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

Constant Summary collapse

DATABASE =
'/Library/Application\ Support/com.apple.TCC/TCC.db'
SUPPORTED_TERMINALS =
%w[
  com.apple.Terminal
  com.googlecode.iterm2
]

Class Method Summary collapse

Class Method Details

.installObject



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/rebuild/command_line_tools.rb', line 16

def install
  obtain_accesibility

  Logger.info('Running command line tools installation...')
  `xcode-select --install`

  Script.execute_scpt('start_install')
  sleep 5 until installed?
  Script.execute_scpt('click_done')
  Logger.finish('Finished to install command line tools')
end

.installed?Boolean

Returns:

  • (Boolean)


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

def installed?
  system('xcode-select -p > /dev/null 2>&1')
end