]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
autogen.sh: Correctly detect .git as a file
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 29 Aug 2013 11:19:45 +0000 (13:19 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 29 Aug 2013 11:19:45 +0000 (13:19 +0200)
One of my previous patches 5cfe0d37cd0be tried to handle the case when
libvirt is a submodule of another project. In that case, the .git is
just a link to the parent .git directory (which the autogen.sh script
didn't count on). The fix was missing 'test' though.

autogen.sh

index f7c2022e4f166bc52f412a4edb9b9bc429ea1490..5aa1990fdefbd5c2c3afe19363e49869703ef78f 100755 (executable)
@@ -64,7 +64,7 @@ bootstrap_hash()
 # like to run 'git clean -x -f po' to fix it; but only ./bootstrap regenerates
 # the required file po/Makevars.
 # Only run bootstrap from a git checkout, never from a tarball.
-if test -d .git || -f .git; then
+if test -d .git || test -f .git; then
     curr_status=.git-module-status t=
     if test "$no_git"; then
         t=no-git