diff options
author | Michael Stapelberg <michael@stapelberg.de> | 2012-10-10 09:09:38 +0200 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2012-11-29 10:24:52 +0100 |
commit | e527fdc914d4b4fa816ea9e563c6abf6505b39d3 (patch) | |
tree | 84596df569fdd51c351bdfe1719eb3bcc90526f8 | |
parent | 12fc61fbbdf1ca2df25281a7d8e00f2dab75d1c2 (diff) | |
download | util-keysyms-e527fdc914d4b4fa816ea9e563c6abf6505b39d3.tar.gz |
autogen.sh: verify that git submodules are initialized
-rwxr-xr-x | autogen.sh | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -6,6 +6,21 @@ test -z "$srcdir" && srcdir=. ORIGDIR=`pwd` cd $srcdir +# If this is a git checkout, verify that the submodules are initialized, +# otherwise autotools will just fail with an unhelpful error message. +if [ -d ".git" ] && [ -r ".gitmodules" ] +then + # If git is not in PATH, this will not return 0, thus not keeping us + # from building. Since the message is worthless when git is not + # installed, this is what we want. + if git submodule status 2>/dev/null | grep -q '^-' + then + echo "You have uninitialized git submodules." >&2 + echo "Please run: git submodule update --init" >&2 + exit 1 + fi +fi + autoreconf -v --install || exit 1 cd $ORIGDIR || exit $? |