[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] bootstrap: obey --no-git.
From: |
James Youngman |
Subject: |
[PATCH] bootstrap: obey --no-git. |
Date: |
Sat, 11 Jun 2011 10:50:33 +0100 |
* build-aux/bootstrap: obey the --no-git option.
---
ChangeLog | 5 +++
build-aux/bootstrap | 92 ++++++++++++++++++++++++++-------------------------
2 files changed, 52 insertions(+), 45 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 69e4e03..057175f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-11 James Youngman <address@hidden>
+
+ bootstrap: obey --no-git.
+ * build-aux/bootstrap: obey the --no-git option.
+
2011-06-09 Bruno Haible <address@hidden>
thread: Support pthreads-win32.
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 522ac70..e8bb0ad 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2011-05-16.16; # UTC
+scriptversion=2011-06-11.09; # UTC
# Bootstrap this package from checked-out sources.
@@ -509,59 +509,61 @@ git_modules_config () {
test -f .gitmodules && git config --file .gitmodules "$@"
}
-gnulib_path=`git_modules_config submodule.gnulib.path`
-test -z "$gnulib_path" && gnulib_path=gnulib
+if $use_git; then
+ gnulib_path=`git_modules_config submodule.gnulib.path`
+ test -z "$gnulib_path" && gnulib_path=gnulib
-# Get gnulib files.
+ # Get gnulib files.
-case ${GNULIB_SRCDIR--} in
--)
- if git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- git submodule init || exit $?
- git submodule update || exit $?
+ case ${GNULIB_SRCDIR--} in
+ -)
+ if git_modules_config submodule.gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ git submodule init || exit $?
+ git submodule update || exit $?
- elif [ ! -d "$gnulib_path" ]; then
- echo "$0: getting gnulib files..."
+ elif [ ! -d "$gnulib_path" ]; then
+ echo "$0: getting gnulib files..."
- trap cleanup_gnulib 1 2 13 15
+ trap cleanup_gnulib 1 2 13 15
- shallow=
- git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
- git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
- cleanup_gnulib
+ shallow=
+ git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
+ git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
+ cleanup_gnulib
- trap - 1 2 13 15
- fi
- GNULIB_SRCDIR=$gnulib_path
- ;;
-*)
- # Use GNULIB_SRCDIR as a reference.
- if test -d "$GNULIB_SRCDIR"/.git && \
- git_modules_config submodule.gnulib.url >/dev/null; then
- echo "$0: getting gnulib files..."
- 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 $?
- else
- # This fallback allows at least git 1.5.5.
- if test -f "$gnulib_path"/gnulib-tool; then
- # Since file already exists, assume submodule init already complete.
- git submodule update || exit $?
+ trap - 1 2 13 15
+ fi
+ GNULIB_SRCDIR=$gnulib_path
+ ;;
+ *)
+ # Use GNULIB_SRCDIR as a reference.
+ if test -d "$GNULIB_SRCDIR"/.git && \
+ git_modules_config submodule.gnulib.url >/dev/null; then
+ echo "$0: getting gnulib files..."
+ 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 $?
else
- # Older git can't clone into an empty directory.
- rmdir "$gnulib_path" 2>/dev/null
- git clone --reference "$GNULIB_SRCDIR" \
- "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
- && git submodule init && git submodule update \
- || exit $?
+ # This fallback allows at least git 1.5.5.
+ if test -f "$gnulib_path"/gnulib-tool; then
+ # Since file already exists, assume submodule init already complete.
+ git submodule update || exit $?
+ else
+ # Older git can't clone into an empty directory.
+ rmdir "$gnulib_path" 2>/dev/null
+ git clone --reference "$GNULIB_SRCDIR" \
+ "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
+ && git submodule init && git submodule update \
+ || exit $?
+ fi
fi
+ GNULIB_SRCDIR=$gnulib_path
fi
- GNULIB_SRCDIR=$gnulib_path
- fi
- ;;
-esac
+ ;;
+ esac
+fi
if $bootstrap_sync; then
cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
--
1.7.2.5
- [PATCH] bootstrap: obey --no-git.,
James Youngman <=