bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] Use "git -h" in bootstrap instead of "git --help"


From: Andreas Gruenbacher
Subject: [PATCH] Use "git -h" in bootstrap instead of "git --help"
Date: Tue, 20 Apr 2010 00:30:51 +0200

Use "git -h" for testing for supported options instead of "git --help".  The
short-form option only shows a summary, and doesn't layout the full man page,
which is much faster and saves a dependency.

(We found out that git uses man in a build environment of
 http://hydra.nixos.org/, which by default doesn't have man installed.)

Grep for the full option name in the summary, too.

Signed-off-by: Andreas Gruenbacher <address@hidden>
---
 ChangeLog           |    7 +++++++
 build-aux/bootstrap |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index ed85f8f..c91607c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-20  Andreas Gruenbacher  <address@hidden>
+
+       * build-aux/bootstrap: Use "git -h" for testing for supported options
+       instead of "git --help".  The short-form option only shows a summary,
+       and doesn't layout the full man page.  Grep for the full option name
+       in the summary, too.
+
 2010-04-19  Bruno Haible  <address@hidden>
 
        * lib/diffseq.h: Fix typo in comment.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 365a3d9..9686baa 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -424,7 +424,7 @@ case ${GNULIB_SRCDIR--} in
 
     trap cleanup_gnulib 1 2 13 15
 
-    git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
+    git clone -h|grep -- --depth > /dev/null && shallow='--depth 2' || shallow=
     git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
       cleanup_gnulib
 
@@ -437,7 +437,7 @@ case ${GNULIB_SRCDIR--} in
   if test -d "$GNULIB_SRCDIR"/.git && \
         git_modules_config submodule.gnulib.url >/dev/null; then
     echo "$0: getting gnulib files..."
-    if git submodule --help|grep reference > /dev/null; then
+    if git submodule -h|grep -- --reference > /dev/null; then
       # Prefer the one-liner available in git 1.6.4 or newer.
       git submodule update --init --reference "$GNULIB_SRCDIR" \
         "$gnulib_path" || exit $?
-- 
1.7.1.rc1.12.ga601





reply via email to

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