var exec = require('child_process').exec;

if (process.platform.search('win') === 0) {
	console.log('>> Nothing to compile on windows');
} else {
	console.log('>> Compiling jscoverage - this might take some time!');
	child = exec('cd ./jscoverage/nix && ./configure && make',
	  function (error, stdout, stderr) {
	    //console.log(stdout);
	    //console.log(stderr);
	    if (error !== null) {
	      console.log(error);
	    }
	});

	child.on('message', function(m) {
	  console.log(m);
	});
}