forked from apache/cordova-medic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.js
25 lines (22 loc) · 843 Bytes
/
install.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
var os = require('os'),
exec = require('child_process').exec;
console.log('Installing platform specific dependencies...');
console.log('Current platform is ' + os.platform());
var installDependency = function(name) {
var cmd = 'npm install ' + name;
console.log (cmd);
exec(cmd, function (error, stdout, stderr) {
if (error) {
console.log('error: ' + error);
if (stderr) console.log('stderr: ' + stderr);
throw new Error('Dependency installation failed');
}
console.log('Successfully installed ' + name);
});
};
// the following dependencies must be installed only on non-Windows paltforms
if (os.platform() !== "win32") {
if (os.platform() !== "linux")
installDependency('ios-deploy');
//installDependency('git://github.com/filmaj/fruitstrap.git');
}