mirror of
https://github.com/pyenv/pyenv.git
synced 2024-12-22 21:42:43 +00:00
Add require_cc
again
This commit is contained in:
parent
efd9c1cd48
commit
b025dbfdab
1 changed files with 14 additions and 0 deletions
|
@ -848,6 +848,20 @@ verify_gcc() {
|
|||
echo "$gcc"
|
||||
}
|
||||
|
||||
require_cc() {
|
||||
local cc=("$@")
|
||||
while [ -n "${cc}" ]; do
|
||||
{ if [ "${#cc[@]}" -le 1 ]; then
|
||||
"require_${cc}" # display last error
|
||||
else
|
||||
"require_${cc}" 3>/dev/null
|
||||
fi
|
||||
} && return 0
|
||||
cc=("${cc[@]:1}")
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
require_clang() {
|
||||
local clang="$(command -v "$CC" || command -v "clang" || true)"
|
||||
|
||||
|
|
Loading…
Reference in a new issue