[macOS] prepare helpers for macOS 13 (#7071)

This commit is contained in:
Alexey-Ayupov
2023-02-08 20:30:16 +03:00
committed by GitHub
parent 8282937409
commit 6341547de6
2 changed files with 12 additions and 1 deletions

View File

@@ -39,6 +39,14 @@ download_with_retries() {
return 1
}
is_Ventura() {
if [ "$OSTYPE" = "darwin22" ]; then
true
else
false
fi
}
is_Monterey() {
if [ "$OSTYPE" = "darwin21" ]; then
true
@@ -114,6 +122,8 @@ get_brew_os_keyword() {
echo "big_sur"
elif is_Monterey; then
echo "monterey"
elif is_Ventura; then
echo "ventura"
else
echo "null"
fi
@@ -147,7 +157,7 @@ should_build_from_source() {
# Use the '--build-from-source' option to build from source in this case
brew_smart_install() {
local tool_name=$1
local os_name=$(get_brew_os_keyword)
if [[ "$os_name" == "null" ]]; then
echo "$OSTYPE is unknown operating system"