Module: Hackmac::Config

Extended by:
ComplexConfig::Provider::Shortcuts, FileUtils
Defined in:
lib/hackmac/config.rb

Constant Summary collapse

DEFAULT =
"---\nefi:\n  source: 'https://github.com/flori/EFI-some.git'\nusb:\n  os: '/Applications/Install macOS Mojave.app'\ndevices:\n  main:\n    name: 'OSX_EFI'\n  backup:\n    name: 'BACKUP_EFI'\ngithub:\n  user: null\n  access_token: null\nkext:\n  efi_path: 'EFI/CLOVER/kexts/Other'\n  sources:\n    AppleALC:\n      github: 'acidanthera/AppleALC'\n    IntelMausi:\n      github: 'acidanthera/IntelMausi'\n    Lilu:\n      github: 'acidanthera/Lilu'\n    #USBInjectAll:\n    #  github: 'Sniki/OS-X-USB-Inject-All'\n    VirtualSMC:\n      github: 'acidanthera/VirtualSMC'\n      debug: false\n      plugins:\n        - SMCProcessor\n        - SMCSuperIO\n    BrcmPatchRAM2:\n      download:\n        name:    'BrcmPatchRAM'\n        version: '2.2.10'\n        url:     'https://bitbucket.org/RehabMan/os-x-brcmpatchram/downloads/RehabMan-BrcmPatchRAM-2018-0505.zip'\n      plugins:\n        - BrcmFirmwareData\n    WhateverGreen:\n      github: 'acidanthera/WhateverGreen'\n"

Class Method Summary collapse

Class Method Details

.loadObject



52
53
54
55
56
57
58
59
60
61
# File 'lib/hackmac/config.rb', line 52

def self.load
  path = File.expand_path('~/.config/hackmac')
  mkdir_p path
  ComplexConfig::Provider.config_dir = path
  config_path = File.join(path, 'hackmac.yml')
  unless File.exist?(config_path)
    File.secure_write(config_path, DEFAULT)
  end
  complex_config.hackmac
end