[PATCH] bootstrap: double quote an expression with a wildcard

KO Myung-Hun <[email protected]>
Newsgroups gmane.comp.gnu.libtool.patches
Message-ID <[email protected]>
This prevents from expansion of a wildcard, and find from failing
with the following error.

    find: paths must precede expression

* bootstrap (require_buildreq_patch): Double quote *.diff
* gl/build-aux/bootstrap.in (require_buildreq_patch): Likewise.
---
 bootstrap                 |    2 +-
 gl/build-aux/bootstrap.in |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/bootstrap b/bootstrap
index eecab2c..9cbe2fc 100755
--- a/bootstrap
+++ b/bootstrap
@@ -3546,7 +3546,7 @@ func_require_buildreq_patch ()
       # The ugly find invocation is necessary to exit with non-zero
       # status for old find binaries that don't support -exec fully.
       if test ! -d "$local_gl_dir" \
-          || find "$local_gl_dir" -name *.diff -exec false {} \; ; then :
+          || find "$local_gl_dir" -name "*.diff" -exec false {} \; ; then :
       else
           func_append buildreq 'patch - http://www.gnu.org/s/patch
 '
diff --git a/gl/build-aux/bootstrap.in b/gl/build-aux/bootstrap.in
index 266eb20..4d0cabe 100755
--- a/gl/build-aux/bootstrap.in
+++ b/gl/build-aux/bootstrap.in
@@ -1215,7 +1215,7 @@ func_require_buildreq_patch ()
       # The ugly find invocation is necessary to exit with non-zero
       # status for old find binaries that don't support -exec fully.
       if test ! -d "$local_gl_dir" \
-          || find "$local_gl_dir" -name *.diff -exec false {} \; ; then :
+          || find "$local_gl_dir" -name "*.diff" -exec false {} \; ; then :
       else
           func_append buildreq 'patch - http://www.gnu.org/s/patch
 '
-- 
1.7.3.2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.