From 2d9ab1f7f82f9a98b97d1503c1e3f31c86061c15 Mon Sep 17 00:00:00 2001 From: johnraff Date: Thu, 12 Mar 2020 14:37:21 +0900 Subject: Test for executables: replace 'which' with more robust 'command -v' Instances of: if [ $(which ] have been replaced with: if command -v >/dev/null which is considered to be more robust in a range of environments. scripts/build/chroot_archives: line 259: if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ] has been left untouched because the chroot might require a more complex command which would need more testing. manpages/Makefile: line 42: @if [ ! -x "$$(which po4a 2>/dev/null)" ]; \ has been left untouched because I am not sufficiently familiar with makefiles. --- share/bin/Packages | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/bin') diff --git a/share/bin/Packages b/share/bin/Packages index ad69fad83..60cd999fc 100755 --- a/share/bin/Packages +++ b/share/bin/Packages @@ -11,7 +11,7 @@ set -e -if [ ! $(which grep-aptavail) ] +if ! command -v grep-aptavail >/dev/null then echo "E: program grep-aptavail not found!" -- cgit v1.2.3