From 63fc13179bff2753ed8af73dc943c4724530d241 Mon Sep 17 00:00:00 2001 From: link2xt Date: Tue, 28 Feb 2023 19:11:43 +0000 Subject: [PATCH] scripts/ndk-make.sh: escape grep argument This makes `scripts/ndk-make.sh` print meaningful error. --- scripts/ndk-make.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ndk-make.sh b/scripts/ndk-make.sh index 39fc138a3..3d23c109f 100755 --- a/scripts/ndk-make.sh +++ b/scripts/ndk-make.sh @@ -65,7 +65,7 @@ export CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER="$TOOLCHAIN/bin/x86_64-linux-and RUSTUP_TOOLCHAIN=$(cat "$(dirname "$0")/rust-toolchain") # Check if the argument is a correct architecture: -if test $1 && echo "armeabi-v7a arm64-v8a x86 x86_64" | grep -vwq $1; then +if test $1 && echo "armeabi-v7a arm64-v8a x86 x86_64" | grep -vwq -- $1; then echo "Architecture '$1' not known, possible values are armeabi-v7a, arm64-v8a, x86 and x86_64." exit fi