From f7086d36847df832409c88bb4eabcadd0e27b3fe Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Mon, 2 Jun 2014 22:11:24 +0200 Subject: [PATCH] Automagically setup submodules on first run. I mean, who's reading the README, anyway? Signed-off-by: Thorsten Behrens --- README | 4 ---- autogen.sh | 8 ++++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/README b/README index f5a71bea4b08f..e947add40d20c 100644 --- a/README +++ b/README @@ -26,10 +26,6 @@ contributed under the terms of the applicable license. Building Ceph ============= -To prepare the source tree after it has been git cloned, - - git submodule update --init - To build the server daemons, and FUSE client, execute the following: ./autogen.sh diff --git a/autogen.sh b/autogen.sh index 43b5cc439e38d..13e6d9c7f22d8 100755 --- a/autogen.sh +++ b/autogen.sh @@ -28,6 +28,14 @@ else exit 1 fi +if test -d ".git" ; then + if ! git submodule update --init; then + echo "Error: could not initialize submodule projects" + echo " Network connectivity might be required." + exit 1 + fi +fi + rm -f config.cache aclocal -I m4 --install check_for_pkg_config -- 2.39.5