configure: Replace which(1) with "has"
PATCH 1/1 configure: Replace which(1) with "has"
Using "has" is more slick because which(1) is not always there.
Signed-off-by Fam Zheng <[email protected]>
--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
configure +1 -1
@@ -2727,7 +2727,7 @@ fi if test "$modules" = yes; then shacmd_probe="sha1sum sha1 shasum" for c in $shacmd_probe; do - if which $c >/dev/null 2>&1; then + if has $c; then shacmd="$c" break fi
Signature · 1 line
1.9.3
Am 04.12.2014 um 07:18 schrieb Fam Zheng:
Quoted 12 lines
Using "has" is more slick because which(1) is not always there.
Signed-off-by Fam Zheng <[email protected]>--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)configure +0
-0
configure fi · line 2733
Quoted 8 lines
configure +1
-1@@ -2727,7 +2727,7 @@ fi if test "$modules" = yes; then shacmd_probe="sha1sum sha1 shasum" for c in $shacmd_probe; do - if which $c >/dev/null 2>&1; then + if has $c; then shacmd="$c" break fi
Reviewed-by Stefan Weil <[email protected]>
Quoted 12 lines · Fam Zheng
Using "has" is more slick because which(1) is not always there.
Signed-off-by Fam Zheng <[email protected]>--- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)configure +0
-0
configure fi · line 2730
Quoted 5 lines
configure +1
-1@@ -2727,7 +2727,7 @@ fi if test "$modules" = yes; then shacmd_probe="sha1sum sha1 shasum" for c in $shacmd_probe; do - if which $c >/dev/null 2>&1; then + if has $c; then
we use self defined has function to check command in all other place in configure. LGTM.
Reviewed-by Amos Kong <[email protected]>
Quoted 6 lines
configure +0
-0shacmd="$c" break fiSignature · 1 line
1.9.3
Signature · 1 line
Amos.
Michael Tokarev
AppliedQuoted 1 line · Fam Zheng
Using "has" is more slick because which(1) is not always there.
Applied to -trivial, thank you!
/mjt