From 429a8390e7a02a355d8ceae969662ab1ff5d87a2 Mon Sep 17 00:00:00 2001
From: Hans-Christoph Steiner <hans@eds.org>
Date: Thu, 2 Dec 2021 17:37:51 +0100
Subject: [PATCH] tor-droid-make.sh: use standard paths for NDK

"NDK Side-by-side" packages are installed into $ANDROID_SDK_ROOT/ndk/
without the trailing "s":

Android's sdkmanager was warning:

Warning: Observed package id 'ndk;21.3.6528147' in inconsistent location
'/opt/android-sdk/ndks/21.3.6528147' (Expected
'/opt/android-sdk/ndk/21.3.6528147')

closes #55
---
 tor-droid-make.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tor-droid-make.sh b/tor-droid-make.sh
index eee46b1b..2299d33d 100755
--- a/tor-droid-make.sh
+++ b/tor-droid-make.sh
@@ -32,11 +32,11 @@ check_android_dependencies()
     # openssl wants a var called ANDROID_NDK_HOME
     if [ ! -e "$ANDROID_NDK_HOME" ]; then
 	ndkVersion=$(sed -En 's,NDK_REQUIRED_REVISION *:?= *([0-9.]+).*,\1,p' external/Makefile)
-	echo $ANDROID_HOME/ndks/$ndkVersion/source.properties
+	echo $ANDROID_HOME/ndk/$ndkVersion/source.properties
 	if [ -n "$ANDROID_NDK_ROOT" ]; then
 	    export ANDROID_NDK_HOME="$ANDROID_NDK_ROOT"
-	elif [ -e "$ANDROID_HOME/ndks/$ndkVersion/source.properties" ]; then
-	    export ANDROID_NDK_HOME="$ANDROID_HOME/ndks/$ndkVersion"
+	elif [ -e "$ANDROID_HOME/ndk/$ndkVersion/source.properties" ]; then
+	    export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/$ndkVersion"
 	elif [ -e "$ANDROID_HOME/ndk-bundle/source.properties" ]; then
 	    export ANDROID_NDK_HOME="$ANDROID_HOME/ndk-bundle"
 	else
-- 
GitLab