-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
executable file
·33 lines (32 loc) · 953 Bytes
/
install
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
33
#!/usr/bin/env node
var exec = require('child_process').exec;
console.log('Installing...')
var child = exec('cd ' + __dirname + '; sudo npm install --no-bin-links;')
child.stdout.on('data', function(data) {
console.log(data)
})
child.stderr.on('data', function(data) {
console.log(data)
})
child.on('close', function(code) {
var child2 = exec('sudo apt-get update')
child2.stdout.on('data', function(data) {
console.log(data)
})
child2.stderr.on('data', function(data) {
console.log(data)
})
child2.on('close', function(code) {
console.log('Updated apt-get with code ' + code)
var child3 = exec('sudo apt-get install heirloom-mailx -y')
child3.stdout.on('data', function(data) {
console.log(data)
})
child3.stderr.on('data', function(data) {
console.log(data)
})
child3.on('close', function(code) {
console.log('Installing heirloom-mailx finished with code ' + code)
})
})
})