"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const fs_1 = __importDefault(require("fs"));
const path_1 = __importDefault(require("path"));
// The path to the file to add the shebang to.
const filePath = path_1.default.join(__dirname, "./index.js");
// Read the current contents of the file.
const contents = fs_1.default.readFileSync(filePath, "utf8");
// if shebang already exists, ignore
if (!contents.startsWith("#!/usr/bin/env node")) {
    // Write the shebang plus the current contents back to the file.
    fs_1.default.writeFileSync(filePath, `#!/usr/bin/env node\n${contents}`);
}
