Skip to content

Commit 1be7d24

Browse files
authored
Fix build script when NDK_ROOT is set (#1203)
When `NDK_ROOT` is set, this script would still set it to `/tmp/android-ndk-r21e`, which does not normally contains NDK unless `NDK_ROOT` is NOT set and `install_prereqs.sh` is called before. Fix that line so that the if statement would properly exit when `NDK_ROOT` is set.
1 parent 399f740 commit 1be7d24

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

build_scripts/android/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ absbuildpath=$( pwd -P )
2727
cd "${origpath}"
2828

2929
# If NDK_ROOT is not set or is the wrong version, use to the version in /tmp.
30-
if [[ -z "${NDK_ROOT}" || ! $(grep -q "Pkg\.Revision = 21\." "${NDK_ROOT}/source.properties") ]]; then
30+
if [[ -z "${NDK_ROOT}" || -z $(grep "Pkg\.Revision = 21\." "${NDK_ROOT}/source.properties") ]]; then
3131
if [[ ! -d /tmp/android-ndk-r21e ]]; then
3232
echo "Recommended NDK version r21e not present in /tmp."
3333
echo "Please run install_prereqs.sh if you wish to use the recommended NDK version."

0 commit comments

Comments
 (0)