flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
20
BACK_BACK/node_modules/brfs/bin/cmd.js
generated
vendored
Executable file
20
BACK_BACK/node_modules/brfs/bin/cmd.js
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env node
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
var brfs = require('../');
|
||||
var file = process.argv[2];
|
||||
|
||||
if (file === '-h' || file === '--help') {
|
||||
return fs.createReadStream(path.join(__dirname, 'usage.txt'))
|
||||
.pipe(process.stdout)
|
||||
;
|
||||
}
|
||||
|
||||
var fromFile = file && file !== '-';
|
||||
var rs = fromFile
|
||||
? fs.createReadStream(file)
|
||||
: process.stdin
|
||||
;
|
||||
|
||||
var fpath = fromFile ? file : path.join(process.cwd(), '-');
|
||||
rs.pipe(brfs(fpath)).pipe(process.stdout);
|
||||
Loading…
Add table
Add a link
Reference in a new issue