libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bootstrap patch


From: Bruce Korb
Subject: bootstrap patch
Date: Sun, 26 Jan 2014 10:08:07 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130922 Icedove/17.0.9

Hi,

"test -f .git"?  Do you mean "test -d .git"?

Anyway, if you want to test for "are we in a git repo hierarchy?"
would not "git rev-parse --git-dir" be better?

diff --git a/bootstrap b/bootstrap
index 2094e73..b84fa63 100755
--- a/bootstrap
+++ b/bootstrap
@@ -230,7 +230,7 @@ vc_ignore=

 # Source required external libraries:
 # Set a version string for this script.
-scriptversion=2014-01-03.01; # UTC
+scriptversion=2014-01-26.18; # UTC

 # General shell script boiler plate, and helper functions.
 # Written by Gary V. Vaughan, 2004
@@ -3698,9 +3698,9 @@ func_require_git ()
     $opt_skip_git && GIT=true

     test true = "$GIT" || {
-      if test -f .git; then
-        ($GIT --version) >/dev/null 2>&1 || GIT=true
-      fi
+      git_root_dir=`exec 2>/dev/null
+        $GIT rev-parse --git-dir`
+      test -z "$git_root_dir" && GIT=true
     }

     func_verbose "GIT='$GIT'"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]