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

ndk_helper.sh « autobuild « tools - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ff150788562778d01cc9b9002baef484aa58d88b (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
36
set -e -u

LOCAL_DIRNAME="${PWD}/$(dirname "$0")"

# Echoes found NDK root path or nothing if not found
# return 1 on error and 0 on success
GetNdkRoot()
{
  local FILENAME="$LOCAL_DIRNAME/../../android/local.properties"
  while read line
  do
    if [[ "${line:0:7}" == "ndk.dir" ]]; then
      echo "${line:8}"
      return 0
    fi
  done < $FILENAME
  return 1
}

GetNdkHost()
{
  if [[ "${OSTYPE:0:5}" == "linux" ]]; then
    echo "linux-x86"
    return 0
  fi
  if [[ "${OSTYPE:0:6}" == "darwin" ]]; then
    echo "darwin-x86"
    return 0
  fi
  if [[ "$OSTYPE" == "msys" ]]; then
    echo windows
    return 0
  fi
  echo "ERROR: Can't detect your host OS"
  return 1
}