autogen.sh: only set up submodules if we have a .git directory
authorColin Walters <walters@verbum.org>
Thu, 20 Jun 2013 16:04:01 +0000 (12:04 -0400)
committerDan Williams <dcbw@redhat.com>
Thu, 20 Jun 2013 21:14:08 +0000 (16:14 -0500)
This way we do the right thing for tarball builds.

autogen.sh

index 3b4c281..54ae4ec 100755 (executable)
@@ -19,9 +19,11 @@ PKG_NAME=NetworkManager
 cd $srcdir
 
 # Fetch submodules if needed
-echo "+ Setting up submodules"
-git submodule init
-git submodule update
+if test -d $srcdir/.git; then
+    echo "+ Setting up submodules"
+    git submodule init
+    git submodule update
+fi
 
 gtkdocize || exit 1
 autopoint --force