blob: 6e52f2e8b34d017ddcc5a0f0891818656a9cda80 (
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
|
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
# TODO add Windows
return 1
}
|