mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
test.js ls
This commit is contained in:
parent
dc095e9ef9
commit
601e69604f
1 changed files with 9 additions and 7 deletions
16
test/test.js
16
test/test.js
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue