diff --git a/package.json b/package.json index 19dee3ecb..0a5f1bf26 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,7 @@ "rebuild": "node generate && node-gyp configure build", "recompileDebug": "node-gyp configure --debug build", "rebuildDebug": "node generate && node-gyp configure --debug build", - "xcodeDebug": "node-gyp configure -- -f xcode" + "xcodeDebug": "node-gyp configure -- -f xcode", + "postinstall": "bash postinstall.sh" } } diff --git a/postinstall.sh b/postinstall.sh new file mode 100755 index 000000000..b3fd35fab --- /dev/null +++ b/postinstall.sh @@ -0,0 +1,12 @@ +#!/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 +fi