UNPKG

@aldenquimby/flywaydb-cli

Version:

Install latest flywaydb-cli as a node module

18 lines (14 loc) 395 B
const path = require("path"); const fs = require("fs"); const touch = filename => fs.closeSync(fs.openSync(filename, "w")); const binDir = path.join(__dirname, "bin"); if (!fs.existsSync(binDir)) { fs.mkdirSync(binDir); } else { fs.rmSync(binDir, { recursive: true, force: true }); fs.mkdirSync(binDir); } // usage touch("./bin/flyway"); touch("./bin/flyway.cmd"); console.log("done");