NewsBlur-viq/node/node_modules/supervisor/lib/cli-wrapper.js

13 lines
313 B
JavaScript
Raw Normal View History

2012-01-02 18:22:06 -08:00
#!/usr/bin/env node
var path = require("path")
2016-11-29 18:29:50 -08:00
, fs = require("fs")
2012-01-02 18:22:06 -08:00
, args = process.argv.slice(1)
var arg, base;
do arg = args.shift();
2016-11-29 18:29:50 -08:00
while ( fs.realpathSync(arg) !== __filename
&& !(base = path.basename(arg)).match(/^supervisor$|^supervisor.js$|^node-supervisor$/)
2012-01-02 18:22:06 -08:00
)
require("./supervisor").run(args)