@jitterbox/flywaydb-cli
Version:
Install latest flywaydb-cli as a node module (forked from github.com/sgraham785/flywaydb-cli)
20 lines (16 loc) • 457 B
JavaScript
const fs = require("fs");
const path = require("path");
const rimraf = require("rimraf");
const { closeSync, openSync } = require("fs");
const touch = filename => closeSync(openSync(filename, "w"));
const binDir = path.join(__dirname, "bin");
if (!fs.existsSync(binDir)) {
fs.mkdirSync(binDir);
} else {
rimraf.sync(binDir);
fs.mkdirSync(binDir);
}
// usage
touch("./bin/flyway");
touch("./bin/flyway.cmd");
console.log("done");