forked from loginov-rocks/Web-Bluetooth-Terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cli.js
21 lines (14 loc) · 554 Bytes
/
cli.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env node
/* eslint-env node */
'use strict';
const gitClone = require('git-clone');
const packageJson = require('./package.json');
let repository = packageJson.repository.url;
repository = repository.substring(repository.indexOf('https://'));
const tag = 'v' + packageJson.version;
const destination = process.argv[2] || './';
process.stdout.write(`Cloning Git repository from ${repository} to ` +
`${destination} using ${tag}...`);
gitClone(repository, destination, {checkout: tag}, () => {
process.stdout.write(' done!\n');
});