File tree Expand file tree Collapse file tree
.github/workflows/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -673,7 +673,7 @@ install_android_sdk() {
673673 # (e.g., "google-android-ndk-r26-installer" on Debian)
674674 if [[ ! -d " ${ANDROID_NDK_HOME:- } " ]]; then
675675 install_android_ndk " $android_ndk_version "
676- elif [[ ! $( grep -q " Pkg.ReleaseName = ${android_ndk_version} " " ${ANDROID_NDK_HOME} /source.properties" ) ]]; then
676+ elif [[ $( grep -q " Pkg.ReleaseName = ${android_ndk_version} " " ${ANDROID_NDK_HOME} /source.properties" ) -eq 1 ]]; then
677677 log " Android NDK $android_ndk_version did not match $( grep " Pkg.ReleaseName" " $ANDROID_NDK_HOME /source.properties" ) "
678678 # Check if the correct NDK is already cached in the same directory, as
679679 # it often is on GitHub runners, and use it if so
@@ -683,10 +683,10 @@ install_android_sdk() {
683683 log " Found the directory"
684684 fi
685685 local foo=$( cat " ${try_ndk_path} /source.properties" )
686- local goo=$( grep -q " Pkg.ReleaseName = ${android_ndk_version} " " ${try_ndk_path} /source.properties" )
686+ local goo=$( grep " Pkg.ReleaseName = ${android_ndk_version} " " ${try_ndk_path} /source.properties" )
687687 log " Looked in $foo "
688688 log " Got $goo "
689- if [[ -d " ${try_ndk_path} " && $( grep -q " Pkg.ReleaseName = ${android_ndk_version} " " ${try_ndk_path} /source.properties" ) ]]; then
689+ if [[ -d " ${try_ndk_path} " ]] && [[ $( grep -q " Pkg.ReleaseName = ${android_ndk_version} " " ${try_ndk_path} /source.properties" ) -eq 0 ]]; then
690690 log " Found a matching Android NDK $android_ndk_version at $try_ndk_path instead"
691691 export ANDROID_NDK_HOME=" $try_ndk_path "
692692 else
You can’t perform that action at this time.
0 commit comments