'Update the settings.js file from configuration info.'

def update_deck_settings(self):

    source_path = os.path.join(self.installation_config_dir, 'settings.js')
    with open(source_path, 'r') as f:
        source = f.read()
    settings = self.process_deck_settings(source)
    self.check_deck_settings(settings)
    target_path = os.path.join(self.deck_install_dir, 'settings.js')
    print 'Rewriting    deck    settings    in    "{path}".'.format(path=target_path)
    with open(target_path, 'w') as f:
        f.write(''.join(settings))
