From 0740626ef89d610f03234c5a3acc9fba5818eadf Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 8 Mar 2023 22:59:17 +0100 Subject: [PATCH] linting --- tests-ng/update.sh | 4 ++-- tests.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests-ng/update.sh b/tests-ng/update.sh index dcab7a6..26964bf 100755 --- a/tests-ng/update.sh +++ b/tests-ng/update.sh @@ -10,7 +10,7 @@ rl="readlink -f" if ! ${rl} "${0}" >/dev/null 2>&1; then rl="realpath" - if ! hash ${rl}; then + if ! command -v ${rl}; then echo "\"${rl}\" not found !" && exit 1 fi fi @@ -23,7 +23,7 @@ cd "${prev}" # coverage #export PYTHONPATH=".:${PYTHONPATH}" bin="python3 -m catcli.catcli" -if hash coverage 2>/dev/null; then +if command -v coverage 2>/dev/null; then bin="coverage run -p --source=catcli -m catcli.catcli" #bin="coverage run -p --source=${prev}/catcli -m catcli.catcli" fi diff --git a/tests.sh b/tests.sh index 0d8d145..5cc11a0 100755 --- a/tests.sh +++ b/tests.sh @@ -76,7 +76,7 @@ done # check shells echo "[+] shellcheck" -if ! which shellcheck >/dev/null 2>&1; then +if ! command -v shellcheck >/dev/null 2>&1; then echo "Install shellcheck" exit 1 fi