From: Hu Tao Date: Fri, 9 Nov 2012 08:47:04 +0000 (+0800) Subject: run bootstrap if .gnulib is not present X-Git-Tag: CVE-2012-3411~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2f9ae426acf6c786684b2ddd9f5d9a58d2187ba;p=thirdparty%2Flibvirt.git run bootstrap if .gnulib is not present 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 [...] -- [...]' which is actually given by git diff .gnulib, which doesn't exist. In the case to run bootstrap to create .gnulib. --- diff --git a/autogen.sh b/autogen.sh index d18339768e..126b272782 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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*)