test.js ls

This commit is contained in:
coderaiser 2012-06-12 14:18:27 +00:00
parent dc095e9ef9
commit 601e69604f

View file

@ -2,15 +2,17 @@ var util = require('util'),
exec = require('child_process').exec,
child;
var lScript='curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz &&' +
'tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz'+
'./phantomjs/bin/phantomjs && ls';
child = exec(lScript,
function (error, stdout, stderr) {
exec('curl http://phantomjs.googlecode.com/files/phantomjs-1.5.0-linux-x86-dynamic.tar.gz',execFunctoin);
exec('tar -zxf phantomjs-1.5.0-linux-x86-dynamic.tar.gz',execFunctoin);
exec('./phantomjs/bin/phantomjs',execFunctoin);
function execFunctoin(error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
console.log('exec error: ' + error);
}
});
}