"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const shelljs_1 = __importDefault(require("shelljs"));
const yargs_1 = __importDefault(require("yargs/yargs"));
const exec = (cmd, fatal = true) => {
    console.log(`$ ${cmd}`);
    const res = shelljs_1.default.exec(cmd);
    if (res.code !== 0) {
        console.error("Error: Command failed with code", res.code);
        console.log(res);
        if (fatal) {
            process.exit(1);
        }
    }
    return res;
};
const argv = yargs_1.default(process.argv.slice(2))
    .alias("c", "chain")
    .option("chain", {
    choices: ["KINT", "INTR"],
    description: "The type of parachain to setup. Defaults to KINT.",
    default: "KINT",
})
    .parseSync();
const chain = argv.chain;
exec("chmod +x ./scripts/docker-setup.sh");
exec(`./scripts/docker-setup.sh ${chain}`);
//# sourceMappingURL=setup-parachain-docker.js.map