Skip to content

Commit

Permalink
remove default dependency on which
Browse files Browse the repository at this point in the history
It is replaced with the built-in `command -v`.
If any recipes require `cmd:which`, they should require it explicitly.
  • Loading branch information
jmairboeck committed Aug 10, 2024
1 parent cd6d330 commit 35a32ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions HaikuPorter/ShellScriptlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
cmd:${targetMachinePrefix}readelf
cmd:sed
cmd:${targetMachinePrefix}strip
cmd:which
cmd:xres
'''

Expand Down Expand Up @@ -332,7 +331,7 @@ def getShellVariableSetters(shellVariables):
CMAKE=$portPackageLinksDir/cmd~cmake/bin/cmake
if [ ! -f $CMAKE ]; then
CMAKE=$(which cmake)
CMAKE=$(command -v cmake)
fi
$CMAKE "$@"
Expand All @@ -349,7 +348,7 @@ def getShellVariableSetters(shellVariables):
MESON=$portPackageLinksDir/cmd~meson/bin/meson
if [ ! -f $MESON ]; then
MESON=$(which meson)
MESON=$(command -v meson)
fi
$MESON --wrap-mode=nodownload "$@"
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PAPER =
BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
ifeq ($(shell command -v $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif

Expand Down

0 comments on commit 35a32ad

Please sign in to comment.