From: Jim Meyering Date: Sat, 29 Jun 2024 22:08:19 +0000 (-0700) Subject: bootstrap-funclib.sh: shrink or split too-long lines X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=490c8802815abca1754a7858080328d577a937c4;p=gnulib.git bootstrap-funclib.sh: shrink or split too-long lines * top/bootstrap-funclib.sh: The generated bootstrap file had lines lines that triggered a syntax-check failure. Sure, I could have exempted this file, but it was easy to comply. Besides, this also fixed a quoting bug in the event that ${GNULIB_URL:-$default_gnulib_url} had a value requiring double quotes. * build-aux/bootstrap: Regenerate. --- diff --git a/ChangeLog b/ChangeLog index 30424d8fbc..e55831aaef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024-06-29 Jim Meyering + + bootstrap-funclib.sh: shrink or split too-long lines + * top/bootstrap-funclib.sh: The generated bootstrap file had lines + lines that triggered a syntax-check failure. Sure, I could have + exempted this file, but it was easy to comply. Besides, this also + fixed a quoting bug in the event that ${GNULIB_URL:-$default_gnulib_url} + had a value requiring double quotes. + * build-aux/bootstrap: Regenerate. + 2024-06-29 Bruno Haible tests: Avoid test failures due to VirtualBox specific bug. diff --git a/build-aux/bootstrap b/build-aux/bootstrap index 6295b8a128..56ffbe4dfc 100755 --- a/build-aux/bootstrap +++ b/build-aux/bootstrap @@ -528,7 +528,7 @@ prepare_GNULIB_SRCDIR () if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then # Use GNULIB_REFDIR as a reference. echo "$0: getting gnulib files..." - git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path" \ + git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path"\ || exit $? else # GNULIB_REFDIR is not set or not usable. Ignore it. @@ -546,12 +546,13 @@ prepare_GNULIB_SRCDIR () # The subdirectory 'gnulib' does not yet exist. Clone into it. echo "$0: getting gnulib files..." trap cleanup_gnulib HUP INT PIPE TERM + gnulib_url=${GNULIB_URL:-$default_gnulib_url} shallow= if test -z "$GNULIB_REVISION"; then if git clone -h 2>&1 | grep -- --depth > /dev/null; then shallow='--depth 2' fi - git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \ + git clone $shallow "$gnulib_url" "$gnulib_path"\ || cleanup_gnulib else if git fetch -h 2>&1 | grep -- --depth > /dev/null; then @@ -567,12 +568,12 @@ prepare_GNULIB_SRCDIR () # is without fetching all commits. So fall back to fetching all # commits. git -C "$gnulib_path" init - git -C "$gnulib_path" remote add origin ${GNULIB_URL:-$default_gnulib_url} + git -C "$gnulib_path" remote add origin "$gnulib_url" git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \ || git -C "$gnulib_path" fetch origin \ || cleanup_gnulib git -C "$gnulib_path" reset --hard FETCH_HEAD - (cd "$gnulib_path" && git checkout "$GNULIB_REVISION") || cleanup_gnulib + (cd "$gnulib_path" && git checkout "$GNULIB_REVISION")||cleanup_gnulib fi trap - HUP INT PIPE TERM else diff --git a/top/bootstrap-funclib.sh b/top/bootstrap-funclib.sh index f7905eb208..87f804eb16 100644 --- a/top/bootstrap-funclib.sh +++ b/top/bootstrap-funclib.sh @@ -491,7 +491,7 @@ prepare_GNULIB_SRCDIR () if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then # Use GNULIB_REFDIR as a reference. echo "$0: getting gnulib files..." - git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path" \ + git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path"\ || exit $? else # GNULIB_REFDIR is not set or not usable. Ignore it. @@ -509,12 +509,13 @@ prepare_GNULIB_SRCDIR () # The subdirectory 'gnulib' does not yet exist. Clone into it. echo "$0: getting gnulib files..." trap cleanup_gnulib HUP INT PIPE TERM + gnulib_url=${GNULIB_URL:-$default_gnulib_url} shallow= if test -z "$GNULIB_REVISION"; then if git clone -h 2>&1 | grep -- --depth > /dev/null; then shallow='--depth 2' fi - git clone $shallow ${GNULIB_URL:-$default_gnulib_url} "$gnulib_path" \ + git clone $shallow "$gnulib_url" "$gnulib_path"\ || cleanup_gnulib else if git fetch -h 2>&1 | grep -- --depth > /dev/null; then @@ -530,12 +531,12 @@ prepare_GNULIB_SRCDIR () # is without fetching all commits. So fall back to fetching all # commits. git -C "$gnulib_path" init - git -C "$gnulib_path" remote add origin ${GNULIB_URL:-$default_gnulib_url} + git -C "$gnulib_path" remote add origin "$gnulib_url" git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION" \ || git -C "$gnulib_path" fetch origin \ || cleanup_gnulib git -C "$gnulib_path" reset --hard FETCH_HEAD - (cd "$gnulib_path" && git checkout "$GNULIB_REVISION") || cleanup_gnulib + (cd "$gnulib_path" && git checkout "$GNULIB_REVISION")||cleanup_gnulib fi trap - HUP INT PIPE TERM else