command -v
This commit is contained in:
parent
77aff50374
commit
fa4708f940
8
urchin
8
urchin
@ -295,9 +295,9 @@ urchin_root() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# -------------------- Dependency checks --------------------
|
# -------------------- Dependency checks --------------------
|
||||||
if which md5 1> /dev/null 2> /dev/null; then
|
if command -v md5 1> /dev/null 2> /dev/null; then
|
||||||
urchin_md5=md5
|
urchin_md5=md5
|
||||||
elif which md5sum 1> /dev/null 2> /dev/null; then
|
elif command -v md5sum 1> /dev/null 2> /dev/null; then
|
||||||
urchin_md5=md5sum
|
urchin_md5=md5sum
|
||||||
else
|
else
|
||||||
echo Could not find MD5 hash command >&2
|
echo Could not find MD5 hash command >&2
|
||||||
@ -616,7 +616,7 @@ main() {
|
|||||||
shift
|
shift
|
||||||
shell_for_sh_tests="${1}"
|
shell_for_sh_tests="${1}"
|
||||||
|
|
||||||
which "${shell_for_sh_tests}" > /dev/null || {
|
command -v "${shell_for_sh_tests}" > /dev/null || {
|
||||||
echo "Cannot find specified shell: '${shell_for_sh_tests}'" >&2
|
echo "Cannot find specified shell: '${shell_for_sh_tests}'" >&2
|
||||||
urchin_help >&2
|
urchin_help >&2
|
||||||
urchin_exit 11
|
urchin_exit 11
|
||||||
@ -691,7 +691,7 @@ main() {
|
|||||||
if ! test -f "${shell_list}"; then
|
if ! test -f "${shell_list}"; then
|
||||||
if $cycle_shell; then
|
if $cycle_shell; then
|
||||||
for shell in $DEFAULT_SHELLS; do
|
for shell in $DEFAULT_SHELLS; do
|
||||||
if which $shell 1> /dev/null 2> /dev/null; then
|
if command -v $shell 1> /dev/null 2> /dev/null; then
|
||||||
echo $shell >> "$shell_list"
|
echo $shell >> "$shell_list"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user