Rewrite configure/make spawning
This commit is contained in:
+15
-9
@@ -162,17 +162,23 @@ function downloadNode(version, next) {
|
||||
|
||||
//makes node.js
|
||||
make: function(next) {
|
||||
var proc = exec(sprintf("cd %s; ./configure; make; ", srcDr));
|
||||
proc.stdout._events = {}; //remove stdout & stdin capture
|
||||
proc.stdin._events = {};
|
||||
proc.stdout.on("data", function(chunk) {
|
||||
process.stdout.write(chunk);
|
||||
var configure = spawn('./configure', [], { cwd: srcDr });
|
||||
configure.stdout.on('data', function(data) {
|
||||
process.stdout.write(data.toString());
|
||||
});
|
||||
proc.stderr.on("data", function(chunk) {
|
||||
process.stdout.write(chunk);
|
||||
configure.stderr.on('data', function(data) {
|
||||
process.stderr.write(data.toString());
|
||||
});
|
||||
configure.on('close', function() {
|
||||
var make = spawn('make', [], { cwd: srcDr });
|
||||
make.stdout.on('data', function(data) {
|
||||
process.stdout.write(data.toString());
|
||||
});
|
||||
make.stderr.on('data', function(data) {
|
||||
process.stderr.write(data.toString());
|
||||
});
|
||||
make.on('close', next);
|
||||
});
|
||||
|
||||
proc.on("exit", next);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user