Welcome to mirror list, hosted at ThFree Co, Russian Federation.

detect_xcode.sh « autobuild « tools - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 47501241dd46b4cd1d8939d499b7b91754703eb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Add your paths into these arrays
KNOWN_IOS_SDK_PATHS=( \
  /Applications/XCode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk \
  /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/
)

KNOWN_IOS_SDK_SIMULATOR_PATHS=( \
  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk \
  /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
)


# Prints path to directory with iOS SDK
# Pameter is configuration name: <debug|release|production|simulator>
# Returns 1 in case of not found and 0 in case of success
PrintIOSSDKPath() {
  PATHS_ARRAY="${KNOWN_IOS_SDK_PATHS[@]}"
  if [[ $1 == *simulator* ]]; then
    for path in "${KNOWN_IOS_SDK_SIMULATOR_PATHS[@]}"; do
      if [ -d "${path}" ]; then
        echo "${path}"
        return 0
      fi
    done
  else
    for path in "${KNOWN_IOS_SDK_PATHS[@]}"; do
      if [ -d "${path}" ]; then
        echo "${path}"
        return 0
      fi
    done
  fi
  # Not found
  return 1
}