"use strict";
/**
 * penguins-eggs
 * krill modules: bootloades.ts
 * author: Piero Proietti
 * email: piero.proietti@gmail.com
 * license: MIT
 * https://stackoverflow.com/questions/23876782/how-do-i-split-a-typescript-class-into-multiple-files
 */
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const utils_1 = require("../../lib/utils");
const utils_2 = tslib_1.__importDefault(require("../../classes/utils"));
/**
 *
 * @param this
 */
async function bootloader() {
    let cmd = `chroot ${this.installTarget} grub-install ${this.partitions.installationDevice} ${this.toNull}`;
    try {
        await (0, utils_1.exec)(cmd, this.echo);
    }
    catch {
        await utils_2.default.pressKeyToExit(cmd);
    }
    cmd = `chroot ${this.installTarget} grub-mkconfig -o /boot/grub/grub.cfg ${this.toNull}`;
    try {
        await (0, utils_1.exec)(cmd, this.echo);
    }
    catch {
        await utils_2.default.pressKeyToExit(cmd);
    }
}
exports.default = bootloader;
