Skip to content

Commit 1c7ad24

Browse files
Added error when libstdc++ is missing and info how to resolve
1 parent 39dfc74 commit 1c7ad24

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"rebuild": "node generate && node-gyp configure build",
8989
"recompileDebug": "node-gyp configure --debug build",
9090
"rebuildDebug": "node generate && node-gyp configure --debug build",
91-
"xcodeDebug": "node-gyp configure -- -f xcode"
91+
"xcodeDebug": "node-gyp configure -- -f xcode",
92+
"postinstall": "./postinstall.sh"
9293
}
9394
}

postinstall.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env bash
2+
3+
if [ -n "$(node lib/nodegit.js 2>&1 | grep libstdc++)" ]; then
4+
echo "[ERROR] Seems like you the latest libstdc++ is missing on your system!"
5+
echo ""
6+
echo "On Ubuntu you can install it using:"
7+
echo ""
8+
echo "$ sudo add-apt-repository ppa:ubuntu-toolchain-r/test"
9+
echo "$ sudo apt-get update"
10+
echo "$ sudo apt-get install libstdc++-4.9-dev"
11+
exit 1
12+
fi

0 commit comments

Comments
 (0)