From b025dbfdabc8b688805298c535440287a992b89c Mon Sep 17 00:00:00 2001 From: Yamashita Yuu Date: Fri, 10 Jan 2014 12:11:42 +0900 Subject: [PATCH] Add `require_cc` again --- plugins/python-build/bin/python-build | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/python-build/bin/python-build b/plugins/python-build/bin/python-build index 5e95b126..a54ca581 100755 --- a/plugins/python-build/bin/python-build +++ b/plugins/python-build/bin/python-build @@ -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)"