2 Commits

Author SHA1 Message Date
bol-van
cb653bedd6 blockcheck: check existense instead of curl 2025-12-02 08:54:10 +03:00
bol-van
534c88c96a fix 'which' function behavior with absolute paths 2025-12-02 08:53:38 +03:00
2 changed files with 5 additions and 1 deletions

View File

@@ -482,7 +482,7 @@ check_prerequisites()
exitp 6
}
local prog progs='curl'
local prog progs="$CURL"
[ "$SKIP_PKTWS" = 1 ] || {
case "$UNAME" in
Linux)

View File

@@ -4,6 +4,10 @@ which()
# 'command -v' replacement does not work exactly the same way. it outputs shell aliases if present
# $1 - executable name
local IFS=:
[ "$1" != "${1#/}" ] && [ -x "$1" ] && {
echo "$1"
return 0
}
for p in $PATH; do
[ -x "$p/$1" ] && {
echo "$p/$1"