mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
Use command -v instead of which
Unlike "which", which is a separate executable not always installed by
default, "command -v" is a shell built-in available at least for bash,
dash, and busybox shell.
Unlike "which", "command -v" is also easier to grep for, and it is
already used in a few places here.
Inspired by commit 57251d811.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
afcfcd3bf6
commit
07ad2473f2
6 changed files with 7 additions and 9 deletions
|
|
@ -37,5 +37,4 @@ dnf install -y \
|
|||
python3-setuptools \
|
||||
python3-wheel \
|
||||
rubygem-asciidoctor \
|
||||
which \
|
||||
xmlto
|
||||
|
|
|
|||
|
|
@ -418,7 +418,7 @@ resolve_path() {
|
|||
local p
|
||||
|
||||
p="${2}"
|
||||
if which realpath > /dev/null; then
|
||||
if command -v realpath > /dev/null; then
|
||||
p=$(realpath "${p}")
|
||||
fi
|
||||
${ECHO} "${1}: ${p}"
|
||||
|
|
@ -427,7 +427,7 @@ resolve_path() {
|
|||
resolve_cmd() {
|
||||
local cpath
|
||||
|
||||
cpath=$(which "${2}")
|
||||
cpath=$(command -v "${2}")
|
||||
resolve_path "${1}" "${cpath}"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue