-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.js
More file actions
22 lines (19 loc) · 596 Bytes
/
cli.js
File metadata and controls
22 lines (19 loc) · 596 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env node
/*!
* cp-file-cli <https://github.com/tunnckoCore/cp-file-cli>
*
* Copyright (c) Charlike Mike Reagent <@tunnckoCore> (http://i.am.charlike.online)
* Released under the MIT license.
*/
'use strict'
const cp = require('cp-file')
const argv = require('minimist')(process.argv.slice(2))
cp(argv._[0], argv._[1], argv).catch((err) => {
console.error('err:', err.toString())
console.error('')
console.error('Example:')
console.error(' cp-file <src> <dest>')
console.error(' cp-file foo/bar/qux.txt dest/path/quxie.txt')
console.error('')
process.exit(1)
})