summaryrefslogtreecommitdiff
path: root/gl
diff options
context:
space:
mode:
authorGary V. Vaughan <gary@gnu.org>2014-01-02 11:58:35 +1300
committerGary V. Vaughan <gary@gnu.org>2014-01-02 12:26:44 +1300
commitd695e72b7467c4bac13d631d36532488372da406 (patch)
tree39897829b1677f2d16ed8d428a9660a6a73e45fc /gl
parent0955ed3ca4eab40d8740f28a0b7322b77bdcd8f3 (diff)
downloadlibtool-d695e72b7467c4bac13d631d36532488372da406.tar.gz
bootstrap: fix gitlog-to-changelog detection.
* gl/build-aux/bootstrap.in (func_ifcontains): Use a for loop that relies on $IFS for element splitting instead of a one-shot case glob that is not tolerant to \n in $gnulib_modules. * THANKS: Add Reuben Thomas. Reported by Reuben Thomas Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Diffstat (limited to 'gl')
-rwxr-xr-xgl/build-aux/bootstrap.in31
1 files changed, 17 insertions, 14 deletions
diff --git a/gl/build-aux/bootstrap.in b/gl/build-aux/bootstrap.in
index 6655cee9..d346fee2 100755
--- a/gl/build-aux/bootstrap.in
+++ b/gl/build-aux/bootstrap.in
@@ -13,7 +13,7 @@
. `echo "$0" |${SED-sed} 's|[^/]*$||'`"extract-trace"
# Set a version string for *this* script.
-scriptversion=2013-09-16.03; # UTC
+scriptversion=2014-01-01.22; # UTC
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -1998,27 +1998,30 @@ func_grep_q ()
# func_ifcontains LIST MEMBER YES-CMD [NO-CMD]
# --------------------------------------------
# If whitespace-separated LIST contains MEMBER then execute YES-CMD,
-# otherwise if NO-CMD was give, execute that.
+# otherwise if NO-CMD was given, execute that.
func_ifcontains ()
{
$debug_cmd
- # The embedded echo is to squash whitespace before globbing.
- _G_wslist=`$bs_echo " "$1" "`
+ _G_wslist=$1
_G_member=$2
_G_yes_cmd=$3
_G_no_cmd=${4-":"}
- case $_G_wslist in
- *" $_G_member "*)
- eval "$_G_yes_cmd"
- _G_status=$?
- ;;
- *)
- eval "$_G_no_cmd"
- _G_status=$?
- ;;
- esac
+ _G_found=false
+ for _G_item in $_G_wslist; do
+ test "x$_G_item" = "x$_G_member" && {
+ _G_found=:
+ break
+ }
+ done
+ if $_G_found; then
+ eval "$_G_yes_cmd"
+ _G_status=$?
+ else
+ eval "$_G_no_cmd"
+ _G_status=$?
+ fi
test 0 -eq "$_G_status" || exit $_G_status
}