mirror of
https://github.com/bvanroll/rpiRadio.git
synced 2025-08-31 04:52:56 +00:00
Initial Commit
This commit is contained in:
27
ProjectNow/NodeServer/node_modules/node-cmd/commandline.js
generated
vendored
Normal file
27
ProjectNow/NodeServer/node_modules/node-cmd/commandline.js
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
var exec = require('child_process').exec;
|
||||
|
||||
var commandline={
|
||||
get:getString,
|
||||
run:runCommand
|
||||
};
|
||||
|
||||
function runCommand(command){
|
||||
exec(
|
||||
command
|
||||
);
|
||||
}
|
||||
|
||||
function getString(command,callback){
|
||||
exec(
|
||||
command,
|
||||
(
|
||||
function(){
|
||||
return function(err,data,stderr){
|
||||
callback(data,err,stderr);
|
||||
}
|
||||
}
|
||||
)(callback)
|
||||
);
|
||||
}
|
||||
|
||||
module.exports=commandline;
|
Reference in New Issue
Block a user