Skip to content

Commit 8eb41ec

Browse files
committed
Build libzmq from node script
1 parent 03098c7 commit 8eb41ec

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"node": ">=0.10"
2525
},
2626
"scripts": {
27-
"build:libzmq": "node scripts/download-win-lib.js && ./build_libzmq.sh",
27+
"build:libzmq": "node scripts/preinstall.js",
2828
"install": "prebuild --install --preinstall \"npm run build:libzmq\"",
2929
"rebuild": "prebuild --compile",
3030
"prebuild": "prebuild --all --strip",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,15 @@ if (process.platform === 'win32') {
1313
}
1414

1515
download(TAR_URL, FILE_NAME);
16+
} else {
17+
console.log('Building libzmq for ' + process.platform)
18+
19+
var spawn = require('child_process').spawn;
20+
var child = spawn('./build_libzmq.sh');
21+
22+
child.stdout.pipe(process.stdout);
23+
child.stderr.pipe(process.stderr);
24+
child.on('error', (err) => {
25+
console.log('Failed to start child process.');
26+
});
1627
}

0 commit comments

Comments
 (0)