]> xenbits.xensource.com Git - people/dariof/libvirt.git/commitdiff
run bootstrap if .gnulib is not present
authorHu Tao <hutao@cn.fujitsu.com>
Fri, 9 Nov 2012 08:47:04 +0000 (16:47 +0800)
committerEric Blake <eblake@redhat.com>
Wed, 21 Nov 2012 14:09:05 +0000 (07:09 -0700)
If .gnulib is deleted unexpectedly, autogen.sh will fail with message:

fatal: ambiguous argument '.gnulib': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

which is actually given by git diff .gnulib, which doesn't exist.

In the case to run bootstrap to create .gnulib.

autogen.sh

index d18339768ed07111073083f203d88411174a902d..126b27278248fb99f8d68d605c2ca6dba77c631e 100755 (executable)
@@ -61,8 +61,10 @@ bootstrap_hash()
 # the required file po/Makevars.
 # Only run bootstrap from a git checkout, never from a tarball.
 if test -d .git; then
-    curr_status=.git-module-status
-    t=$(bootstrap_hash; git diff .gnulib)
+    curr_status=.git-module-status t=
+    if test -d .gnulib; then
+        t=$(bootstrap_hash; git diff .gnulib)
+    fi
     case $t:${CLEAN_SUBMODULE+set} in
         *:set) ;;
         *-dirty*)