summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz93@gmail.com>2023-12-13 00:01:39 -0500
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-01-22 14:13:37 +0100
commitceb885232aa09444142ad9a70e9f6947ca1d70e0 (patch)
tree90980504cfb278b2cecffb07d8ca834f9baf40bb /writerfilter
parent2a5ff80264825e21adb5ff107a3d01237b86f559 (diff)
use portable "command -v" to detect installed programs, part 5
The "which" utility is not guaranteed to be installed either, and if it is, its behavior is not portable either. This means that when various programs are installed, the `which` check will report a fatal error because the which tool did not exist and the shell returned a nonzero status when attempting to fork+exec. If it did exist, it might not be an implementation of `which` that returns nonzero when commands do not exist. The general scripting suggestion is to use the "command -v" shell builtin; this is required to exist in all POSIX 2008 compliant shells, and is thus guaranteed to work everywhere. For some in-depth discussions on the topic, see: - https://mywiki.wooledge.org/BashFAQ/081 - https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then/85250#85250 Examples of open-source shells likely to be installed as /bin/sh on Linux, which implement the 15-year-old standard: ash, bash, busybox, dash, ksh, mksh and zsh. This commit updates documentation to no longer suggest a bad practice that will confuse the reader when it doesn't work. Change-Id: I0ed5ced353124919c7e09912c6d4d5aea146fa33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160666 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/documentation/doxygen/Doxyfile2
1 files changed, 1 insertions, 1 deletions
diff --git a/writerfilter/documentation/doxygen/Doxyfile b/writerfilter/documentation/doxygen/Doxyfile
index 15414b8287c6..6ae1ac4c02aa 100644
--- a/writerfilter/documentation/doxygen/Doxyfile
+++ b/writerfilter/documentation/doxygen/Doxyfile
@@ -1078,7 +1078,7 @@ ALLEXTERNALS = NO
EXTERNAL_GROUPS = YES
# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
+# interpreter (i.e. the result of `command -v perl').
PERL_PATH = /usr/bin/perl