forked from OSchip/llvm-project
[flang] Fix a bug in the `flang` wrapper script
Please see https://github.com/flang-compiler/f18-llvm-project/issues/1344#issuecomment-1012706527 for context and the discussion. Differential Revision: https://reviews.llvm.org/D117297
This commit is contained in:
parent
5e4966cbae
commit
ad643550a5
|
@ -30,8 +30,9 @@ PRINT_VERSION="False"
|
||||||
|
|
||||||
# === check_bash_version ======================================================
|
# === check_bash_version ======================================================
|
||||||
#
|
#
|
||||||
# Checks the Bash version that's used to run this script. Exits immediately if
|
# Checks the Bash version that's used to run this script. Exits immediately
|
||||||
# it's lower than 4.4
|
# with a non-zero return code if it's lower than 4.4. Otherwise returns 0
|
||||||
|
# (success).
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
check_bash_version() {
|
check_bash_version() {
|
||||||
message="Error: Your Bash is too old. Please use Bash >= 4.4"
|
message="Error: Your Bash is too old. Please use Bash >= 4.4"
|
||||||
|
@ -42,6 +43,8 @@ check_bash_version() {
|
||||||
if [[ "${BASH_VERSINFO[0]}" == 4 ]]; then
|
if [[ "${BASH_VERSINFO[0]}" == 4 ]]; then
|
||||||
[[ "${BASH_VERSINFO[1]:-0}" -lt 4 ]] && echo $message && exit 1
|
[[ "${BASH_VERSINFO[1]:-0}" -lt 4 ]] && echo $message && exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# === parse_args ==============================================================
|
# === parse_args ==============================================================
|
||||||
|
|
Loading…
Reference in New Issue