]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
gnulib-tool: Fail properly if the 'join' program is not found.
authorBruno Haible <bruno@clisp.org>
Wed, 12 May 2021 10:35:21 +0000 (12:35 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 12 May 2021 10:35:21 +0000 (12:35 +0200)
Reported by Simon Josefsson <simon@josefsson.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00029.html>.

* gnulib-tool: Bail out early of the 'join' program is not found.

ChangeLog
gnulib-tool

index 314ba87c6239fa3cd9acb46551b580863bc13e4c..0a1f3cc076a2e2e27a67881fa62206c511e84144 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-05-12  Bruno Haible  <bruno@clisp.org>
+
+       gnulib-tool: Fail properly if the 'join' program is not found.
+       Reported by Simon Josefsson <simon@josefsson.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2021-05/msg00029.html>.
+       * gnulib-tool: Bail out early of the 'join' program is not found.
+
 2021-05-09  Bruno Haible  <bruno@clisp.org>
 
        {realloc,calloc}-gnu: Fix autoconf macro (regression 2021-04-18).
index 182b9b4a4e08b83097ebc856036a3db311370b5f..9b5c81529ce29ef90d732bf4e54e48b1962246a4 100755 (executable)
@@ -888,6 +888,15 @@ func_hardlink ()
   }
 }
 
+# The 'join' program does not exist on all platforms.  Where it exists,
+# we can use it.  Where not, bail out.
+if (type join) >/dev/null 2>&1; then
+  :
+else
+  echo "$progname: 'join' program not found. Consider installing GNU coreutils." >&2
+  func_exit 1
+fi
+
 # Ensure an 'echo' command that
 #   1. does not interpret backslashes and
 #   2. does not print an error message "broken pipe" when writing into a pipe