-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbin.js
32 lines (25 loc) · 1.26 KB
/
bin.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env node
const exec = require('child_process').exec
const join = require('path').join
const opts = {env: process.env, cwd: process.cwd()}
const setup = join(__dirname, 'lib', 'setup.js')
const login = join(__dirname, 'lib', 'login.js')
const urls = join(__dirname, 'lib', 'urls.js')
const downloader = join(__dirname, 'lib', 'downloaded.js')
const clean = join(__dirname, 'lib', 'clean.js')
exec(`node --harmony ${setup}`, opts, function (error, stdout, stderr) {
if ( error || stderr ) return console.error(error || stderr)
exec(`node --harmony ${login}`, opts, function (error, stdout, stderr) {
if ( error || stderr ) return console.error(error || stderr)
exec(`node --harmony ${urls}`, opts, function (error, stdout, stderr) {
if ( error || stderr ) return console.error(error || stderr)
exec(`node --harmony ${downloader}`, opts, function (error, stdout, stderr) {
if ( error || stderr ) return console.error(error || stderr)
exec(`node --harmony ${clean}`, opts, function (error, stdout, stderr) {
if ( error || stderr ) return console.error(error || stderr)
console.log('all done')
})
})
})
})
})