mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-03-10 22:44:14 +00:00
Move install script to bin/install-node.js
This commit is contained in:
parent
5226e7db16
commit
16544e41a9
17
bin/install-node.js
Normal file
17
bin/install-node.js
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
var binary = require('node-binary');
|
||||||
|
var nodeVersion = 'v0.12.0';
|
||||||
|
|
||||||
|
console.log('Downloading node-' + nodeVersion + '-' + process.platform + '-' + process.arch);
|
||||||
|
|
||||||
|
binary.download({
|
||||||
|
os: process.platform,
|
||||||
|
arch: process.arch,
|
||||||
|
version: nodeVersion
|
||||||
|
}, './bin/node', function(error, binaryPath) {
|
||||||
|
if(error) {
|
||||||
|
console.error(error.message);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('NodeJS was downloaded to ' + binaryPath);
|
||||||
|
});
|
@ -19,7 +19,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"prepublish": "gulp build",
|
"prepublish": "gulp build",
|
||||||
"test": "gult test",
|
"test": "gult test",
|
||||||
"install": "node-binary download v0.12.0 ./bin/node --arch `node -e 'console.log(process.arch)'` --os `node -e 'console.log(process.platform)'`"
|
"install": "node bin/install-node.js"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"resin",
|
"resin",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user