mirror of
https://git.centos.org/centos-git-common.git
synced 2025-02-23 16:22:56 +00:00
use command instead of which. this is more portable and doesn\'t require another dep
This commit is contained in:
parent
3382beadcc
commit
fd37ab5810
1 changed files with 2 additions and 2 deletions
|
@ -102,13 +102,13 @@ else
|
||||||
QUIET=''
|
QUIET=''
|
||||||
fi
|
fi
|
||||||
|
|
||||||
which git >/dev/null 2>&1
|
command -v git >/dev/null 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo 'You need git in PATH' >&2
|
echo 'You need git in PATH' >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
which curl >/dev/null 2>&1
|
command -v curl >/dev/null 2>&1
|
||||||
if [[ $? -ne 0 ]]; then
|
if [[ $? -ne 0 ]]; then
|
||||||
echo 'You need curl in PATH' >&2
|
echo 'You need curl in PATH' >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue