Remove dependency from 'which' utility

Debian declared the 'which' utility as deprecated.

Fixes #4319
This commit is contained in:
Norman Feske
2021-11-08 21:15:54 +01:00
committed by Christian Helmuth
parent 293d545b97
commit 4cfd954e1e
4 changed files with 6 additions and 9 deletions

View File

@@ -533,11 +533,8 @@ proc have_spec {spec} { global specs; return [expr [lsearch $specs $spec] != -1]
# Return true if specified program is installed
#
proc have_installed {program} {
if {[catch { exec which $program }] == 0} { return true; }
if {[catch { exec which "/sbin/$program" }] == 0} { return true; }
if {[catch { exec which "/usr/sbin/$program" }] == 0} { return true; }
if {[catch { exec which "/usr/local/bin/$program" }] == 0} { return true; }
if {[auto_execok "$program"] != ""} { return true; }
return false;
}