--- a/runtest +++ b/runtest @@ -3,7 +3,7 @@ TCL_VERSIONS="8.5 8.6 9.0" TCLSH="" for VERSION in $TCL_VERSIONS; do - TCL=`which tclsh$VERSION 2>/dev/null` && TCLSH=$TCL + TCL=`command -v tclsh$VERSION 2>/dev/null` && TCLSH=$TCL done if [ -z $TCLSH ] --- a/runtest-moduleapi +++ b/runtest-moduleapi @@ -4,7 +4,7 @@ TCLSH="" [ -z "$MAKE" ] && MAKE=make for VERSION in $TCL_VERSIONS; do - TCL=`which tclsh$VERSION 2>/dev/null` && TCLSH=$TCL + TCL=`command -v tclsh$VERSION 2>/dev/null` && TCLSH=$TCL done if [ -z $TCLSH ] --- a/runtest-sentinel +++ b/runtest-sentinel @@ -3,7 +3,7 @@ TCL_VERSIONS="8.5 8.6 9.0" TCLSH="" for VERSION in $TCL_VERSIONS; do - TCL=`which tclsh$VERSION 2>/dev/null` && TCLSH=$TCL + TCL=`command -v tclsh$VERSION 2>/dev/null` && TCLSH=$TCL done if [ -z $TCLSH ] --- a/src/Makefile +++ b/src/Makefile @@ -68,7 +68,7 @@ INSTALL=install PKG_CONFIG?=pkg-config ifndef PYTHON -PYTHON := $(shell which python3 || which python) +PYTHON := $(shell command -v python3 || command -v python) endif # Default allocator defaults to Jemalloc on Linux and libc otherwise --- a/utils/generate-module-api-doc.rb +++ b/utils/generate-module-api-doc.rb @@ -241,7 +241,7 @@ end # Populate the 'since' map (name => version) if we're in a git repo. require "./" ++ File.dirname(__FILE__) ++ '/module-api-since.rb' git_dir = File.dirname(__FILE__) ++ "/../.git" -if File.directory?(git_dir) && `which git` != "" +if File.directory?(git_dir) && `command -v git` != "" `git --git-dir="#{git_dir}" tag --sort=v:refname`.each_line do |git_tag| next if git_tag !~ /^(\d+)\.(\d+)\.(\d+)(?:-rc\d+)?$/ || $1.to_i < 7 # Version number, ignoring suffixes like -rc1.