Commit 6a65c057 authored by John Haley's avatar John Haley

Move postinstall script from bash to node

parent fe433efd
......@@ -89,6 +89,6 @@
"recompileDebug": "node-gyp configure --debug build",
"rebuildDebug": "node generate && node-gyp configure --debug build",
"xcodeDebug": "node-gyp configure -- -f xcode",
"postinstall": "bash"
"postinstall": "node postinstall.js"
#!/usr/bin/env node
var fs = require("fs");
var child_process = require("child_process");
if (process.platform !== "linux") {
child_process.exec("node lib/nodegit.js", function(error, stdout, stderr) {
if (stderr && ~stderr.indexOf("libstdc++")) {
console.log("[ERROR] Seems like the latest libstdc++ is missing on your system!");
console.log("On Ubuntu you can install it using:");
console.log("$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test");
console.log("$ sudo apt-get update");
console.log("$ sudo apt-get install libstdc++-4.9-dev");
#!/usr/bin/env bash
if [ -n "$(node lib/nodegit.js 2>&1 | grep libstdc++)" ]; then
echo "[ERROR] Seems like the latest libstdc++ is missing on your system!"
echo ""
echo "On Ubuntu you can install it using:"
echo ""
echo "$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test"
echo "$ sudo apt-get update"
echo "$ sudo apt-get install libstdc++-4.9-dev"
exit 1
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment